Archived
1 parent
f5bdd7e21c
commit
affe28ad71
110 files changed
+52936
-14
No files matched your search
@@ -0,0 +1,841 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
HELP = {'ru': [{'id': 'dashboard',
|
||||
'title': 'Главная',
|
||||
'intro': 'Главная — это быстрый ответ на три вопроса: работает ли WireGuard, кто сейчас подключён и всё ли нормально с самим сервером.',
|
||||
'topics': [{'title': 'С чего начать',
|
||||
'paragraphs': ['В верхней панели выбран текущий интерфейс WireGuard. Если интерфейсов несколько, все страницы WGTools работают '
|
||||
'именно с выбранным интерфейсом.'],
|
||||
'bullets': ['«Пуск» запускает WireGuard, «Стоп» останавливает его, «Перезапуск» быстро перезапускает интерфейс.',
|
||||
'После перезапуска телефоны и компьютеры обычно подключаются снова автоматически.',
|
||||
'Если WireGuard остановлен, клиенты этого интерфейса не смогут подключиться.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['wg0 · Home · 10.0.0.1/24 · UDP 51820'],
|
||||
'warning': ''},
|
||||
{'title': 'CPU, память, сеть и время работы',
|
||||
'paragraphs': ['Эти показатели относятся ко всей машине Debian, на которой установлен WGTools.'],
|
||||
'bullets': ['CPU показывает текущую загрузку процессора.',
|
||||
'Память показывает занятую и доступную RAM.',
|
||||
'Сеть показывает текущую скорость приёма и передачи на внешнем интерфейсе.',
|
||||
'Uptime показывает, сколько сервер работает после последней перезагрузки.',
|
||||
'Суточные графики помогают заметить необычную нагрузку или постоянный сетевой трафик.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Кто подключён',
|
||||
'paragraphs': ['WireGuard не держит постоянную «сессию» как обычный веб-сайт. WGTools считает клиента онлайн, если его '
|
||||
'последний handshake был недавно.'],
|
||||
'bullets': ['Handshake — последний успешный обмен служебными пакетами WireGuard.',
|
||||
'Endpoint — внешний IP и порт, с которого клиент сейчас выходит в Интернет.',
|
||||
'«Никогда» означает, что сервер ещё не видел успешного подключения этого клиента.',
|
||||
'Быстрый поиск фильтрует список по имени, VPN-адресу, типу и Endpoint.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Телефон · 10.0.0.3/32', 'Endpoint: 203.0.113.25:63275', 'Handshake: 18 сек назад'],
|
||||
'warning': ''},
|
||||
{'title': 'Трафик',
|
||||
'paragraphs': ['WGTools хранит накопленные RX/TX отдельно от мгновенных счётчиков WireGuard, поэтому статистика не пропадает '
|
||||
'после перезапуска интерфейса или сервера.'],
|
||||
'bullets': ['Карточка «Трафик» показывает общий объём данных выбранного интерфейса.',
|
||||
'У каждого клиента также хранится его накопленный RX/TX.',
|
||||
'«Сбросить» начинает общий и клиентские счётчики заново с текущего момента.',
|
||||
'RX/TX в карточке «Сеть» — это скорость прямо сейчас, а не накопленный объём.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Несколько WireGuard-интерфейсов',
|
||||
'paragraphs': ['На одном сервере можно держать несколько независимых VPN, например домашний и рабочий.'],
|
||||
'bullets': ['Переключение в верхней панели не изменяет конфигурацию — оно только выбирает, с каким интерфейсом сейчас работают '
|
||||
'Главная, Сервер и Клиенты.',
|
||||
'У каждого интерфейса свои адреса, порт, клиенты, маршруты и правила доступа.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['wg0 · Home · 10.0.0.1/24', 'wg1 · Work · 10.0.1.1/24'],
|
||||
'warning': ''}]},
|
||||
{'id': 'server',
|
||||
'title': 'Сервер',
|
||||
'intro': 'Раздел «Сервер» отвечает за сам WireGuard: интерфейсы, маршруты, доступ к сетям, объединение нескольких WGTools через Nodes и '
|
||||
'работу через публичный VPS Relay.',
|
||||
'topics': [{'title': 'Что такое VPN-сеть и интерфейс WireGuard',
|
||||
'paragraphs': ['Интерфейс WireGuard можно представить как отдельную виртуальную сетевую карту. У неё есть своя маленькая '
|
||||
'VPN-сеть, а каждому клиенту выдаётся адрес из этой сети.'],
|
||||
'bullets': ['Системное имя обычно выглядит как wg0, wg1 и т. д.',
|
||||
'Понятное имя, например Home или Office, нужно только для удобства.',
|
||||
'ListenPort — UDP-порт, на который подключаются клиенты.',
|
||||
'MTU обычно можно оставить «Авто»; вручную его меняют только при проблемах с конкретной сетью, LTE или PPPoE.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['VPN-сеть: 10.0.0.0/24', 'Адрес сервера: 10.0.0.1/24', 'Клиенты: 10.0.0.2, 10.0.0.3, ...', 'Порт: UDP 51820'],
|
||||
'warning': ''},
|
||||
{'title': 'Первый запуск и новые интерфейсы',
|
||||
'paragraphs': ['На чистой Debian WGTools может установить WireGuard и создать первый интерфейс через мастер. После этого можно '
|
||||
'добавить wg1, wg2 и другие.'],
|
||||
'bullets': ['WGTools предлагает свободную VPN-сеть, UDP-порт и таблицу policy routing.',
|
||||
'Перед созданием проверяются пересечения сетей и занятые порты.',
|
||||
'Для каждого интерфейса создаются собственные ключи и конфигурация.',
|
||||
'Удаление интерфейса сначала делает резервную копию и очищает связанные управляемые данные.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'NAT простыми словами',
|
||||
'paragraphs': ['NAT/MASQUERADE нужен, когда VPN-клиент должен выходить в локальную сеть или Интернет от имени самого '
|
||||
'WireGuard-сервера. Для домашней установки это обычно самый простой вариант.'],
|
||||
'bullets': ['Если NAT включён, домашнему роутеру обычно не нужен отдельный маршрут обратно к VPN-пулу.',
|
||||
'Если NAT выключен и вы хотите настоящую маршрутизацию без подмены адресов, на соседних роутерах должны быть '
|
||||
'обратные маршруты.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Телефон 10.0.0.3 → WGTools 192.168.1.10 → Интернет', 'Домашний роутер видит источник 192.168.1.10'],
|
||||
'warning': ''},
|
||||
{'title': 'Маршруты и policy routing',
|
||||
'paragraphs': ['Маршрут говорит Linux, через какой интерфейс или шлюз искать определённую сеть. Policy routing добавляет '
|
||||
'отдельную таблицу правил для трафика VPN-клиентов.'],
|
||||
'bullets': ['Обычной домашней установке отдельная policy table часто не нужна.',
|
||||
'Она полезна, если VPN-клиенты должны выходить через конкретный шлюз, другой VPN или отдельный WAN.',
|
||||
'WGTools показывает системные маршруты, маршруты Site-to-Site и созданные вручную маршруты отдельно.',
|
||||
'Пользовательские маршруты можно добавлять, изменять и удалять из интерфейса.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Источник: 10.0.0.0/24', 'Таблица: 200', 'Default via: 192.168.1.1 dev eth0'],
|
||||
'warning': ''},
|
||||
{'title': 'Firewall и доступ к сетям',
|
||||
'paragraphs': ['Firewall определяет не куда отправлять пакет, а разрешён ли ему доступ. Это отдельная вещь от маршрутов.'],
|
||||
'bullets': ['Можно разрешать или запрещать доступ конкретному VPN-клиенту или сети.',
|
||||
'Правила групп и индивидуальные исключения клиентов собираются WGTools автоматически.',
|
||||
'Перед изменениями WGTools делает backup и откатывает конфигурацию, если WireGuard не смог запуститься.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['10.0.0.6/32 → запретить → 192.168.1.0/24', 'Остальным клиентам локальная сеть доступна'],
|
||||
'warning': ''},
|
||||
{'title': 'Site-to-Site: соединяем две обычные сети',
|
||||
'paragraphs': ['Site-to-Site нужен, когда через WireGuard подключается не один телефон, а целая удалённая сеть за роутером или '
|
||||
'сервером.'],
|
||||
'bullets': ['У такого peer указываются «Удалённые сети». WGTools автоматически создаёт для них маршруты.',
|
||||
'Статус online/offline peer не удаляет его маршруты из конфигурации.',
|
||||
'На удалённой стороне также должна быть настроена маршрутизация обратно через WireGuard.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Дом: 192.168.1.0/24',
|
||||
'Офисный peer: 10.0.0.20/32',
|
||||
'Сеть за офисом: 192.168.50.0/24',
|
||||
'Результат: устройства дома могут обращаться к 192.168.50.x'],
|
||||
'warning': ''},
|
||||
{'title': 'WGTools Nodes: связываем несколько WGTools',
|
||||
'paragraphs': ['Nodes соединяет несколько установок WGTools отдельным служебным WireGuard-туннелем. Один сервер становится HUB, '
|
||||
'остальные подключаются к нему по одноразовому коду.'],
|
||||
'bullets': ['HUB использует один номер порта: UDP для WireGuard и TCP для первоначального защищённого подключения.',
|
||||
'После подключения служебная синхронизация идёт внутри интерфейса wgnode0 и не зависит от адреса веб-панели, '
|
||||
'HTTPS-порта или private path.',
|
||||
'При подключении WGTools предлагает найденные VPN-, Site-to-Site и локальные сети. Оставьте только те, которые '
|
||||
'действительно хотите опубликовать.',
|
||||
'Новая найденная сеть позже не публикуется сама — её нужно явно добавить в «Настройках узла». Если VPN-пул, Site-to-Site или LAN изменились после сохранения, WGTools покажет предупреждение и предложит проверить список.',
|
||||
'Опубликованные сети разных узлов не должны пересекаться. Если, например, Home и VPS оба публикуют 10.0.0.0/24, WGTools не даст сохранить такое подключение и покажет конфликт.',
|
||||
'В «Подробнее» можно посмотреть сети и клиентов удалённой панели в режиме только чтения.',
|
||||
'Публикация сети делает её доступной связанным узлам, поэтому не публикуйте сети, которым не нужен межсайтовый '
|
||||
'доступ.'],
|
||||
'example_title': 'Пример: дом + VPS',
|
||||
'example_lines': ['HUB: vpn.example.com:51950',
|
||||
'Home публикует: 192.168.1.0/24',
|
||||
'VPS публикует: 10.20.0.0/24',
|
||||
'После pairing обе стороны получают маршруты через wgnode0'],
|
||||
'warning': ''},
|
||||
{'title': 'VPS Relay: когда у дома нет белого IP',
|
||||
'paragraphs': ['VPS Relay нужен, если клиенты не могут напрямую достучаться до WGTools из Интернета, например из-за CGNAT. '
|
||||
'Публичный VPS становится точкой входа, а сам WireGuard-сервер и правила доступа остаются на вашей машине '
|
||||
'WGTools.'],
|
||||
'bullets': ['Добавьте VPS по SSH: WGTools сначала проверит ОС, доступ и порты, затем установит Relay Agent.',
|
||||
'Один Relay Agent может обслуживать несколько независимых WGTools — подключения и ключи изолированы.',
|
||||
'После установки у поддерживаемых клиентов можно выбрать прямое подключение или подключение через Relay.',
|
||||
'Удаление VPS из WGTools отключает локальную связь, но оставляет Relay Agent и сохранённый tenant на VPS, поэтому '
|
||||
'его можно подключить повторно.',
|
||||
'VPS Relay и Nodes решают разные задачи: Relay даёт публичную точку входа клиентам, Nodes связывает между собой '
|
||||
'несколько WGTools и их сети.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Телефон → публичный VPS → защищённый Relay-транспорт → WGTools дома → нужная сеть'],
|
||||
'warning': ''},
|
||||
{'title': 'Диагностика',
|
||||
'paragraphs': ['Диагностика проверяет состояние WireGuard, IP forwarding, порты, маршруты и связанные системные службы. Она '
|
||||
'полезна, когда клиент не подключается или сеть за VPN недоступна.'],
|
||||
'bullets': ['Сначала смотрите, запущен ли интерфейс и есть ли свежий handshake.',
|
||||
'Если handshake есть, но адрес не пингуется, обычно проблема уже в маршруте, firewall или обратном пути.',
|
||||
'Во вкладке Сервер → Маршрут traceroute показывает каждый отвечающий узел, средний RTT и скачок задержки относительно предыдущего отвечающего hop. Цвет линии и строки помогает сразу увидеть участок, где задержка выросла; неотвечающие служебным пробам узлы показываются нейтрально.',
|
||||
'Интерактивную карту можно масштабировать и перетаскивать; нажатие на узел показывает IP, расположение, ASN/провайдера и RTT.',
|
||||
'При включённой карте публичные IP узлов геолокируются через ipwho.is, тайлы загружаются с OpenStreetMap; локальные адреса на геолокацию не отправляются.',
|
||||
'Traceroute измеряет задержку, а не реальную пропускную способность канала в Мбит/с.',
|
||||
'Диагностика не изменяет конфигурацию сама.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Безопасное применение изменений',
|
||||
'paragraphs': ['Настройки сервера, маршрутов и firewall применяются с коротким перезапуском WireGuard.'],
|
||||
'bullets': ['Перед изменением создаётся резервная копия конфигурации.',
|
||||
'Если новая конфигурация не запускается, WGTools старается вернуть предыдущую автоматически.',
|
||||
'Активные клиенты во время перезапуска кратковременно отключатся и затем переподключатся.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Вкладка «Конфиг»',
|
||||
'paragraphs': ['Это прямой редактор файла /etc/wireguard/<интерфейс>.conf для случаев, которые нельзя выразить обычными формами '
|
||||
'WGTools.'],
|
||||
'bullets': ['Используйте его только если понимаете синтаксис WireGuard и команды PostUp/PostDown.',
|
||||
'Перед сохранением WGTools проверяет конфигурацию и создаёт backup.',
|
||||
'Если WGTools обнаружит нестандартную конфигурацию, часть автоматического редактирования может быть ограничена, '
|
||||
'чтобы не повредить ваши ручные правила.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['[Interface]', 'Address = 10.0.0.1/24', 'ListenPort = 51820', '', '[Peer]', 'AllowedIPs = 10.0.0.2/32'],
|
||||
'warning': 'PrivateKey, PresharedKey и другие секреты не публикуйте и не отправляйте посторонним.'}]},
|
||||
{'id': 'clients',
|
||||
'title': 'Клиенты',
|
||||
'intro': 'Клиент — это телефон, ноутбук, роутер или другой WireGuard-peer. Здесь создаются конфиги, права доступа, сроки, расписания и '
|
||||
'Site-to-Site подключения.',
|
||||
'topics': [{'title': 'Обычный клиент',
|
||||
'paragraphs': ['Для телефона или компьютера выбирайте тип «Клиент». WGTools выдаст свободный VPN-адрес и создаст ключи.'],
|
||||
'bullets': ['Имя нужно только для удобства в панели.',
|
||||
'Endpoint в готовом конфиге — адрес, по которому устройство находит ваш WireGuard-сервер.',
|
||||
'DNS можно задать отдельно для клиента или получить из шаблона группы.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Имя: Phone', 'VPN-адрес: 10.0.0.3/32', 'Endpoint: vpn.example.com:51820'],
|
||||
'warning': ''},
|
||||
{'title': '«Трафик через VPN» и AllowedIPs',
|
||||
'paragraphs': ['AllowedIPs в клиентском конфиге определяет, какой трафик устройство отправит в туннель. Это не то же самое, что '
|
||||
'серверные права доступа.'],
|
||||
'bullets': ['«Весь трафик» отправляет через VPN и Интернет, и удалённые сети.',
|
||||
'Можно отправлять через VPN только нужные сети.',
|
||||
'Пресет с исключением локальных сетей удобен, когда клиенту нужен VPN-Интернет, но домашний принтер или роутер '
|
||||
'должны оставаться доступными напрямую.',
|
||||
'Серверная политика WGTools всё равно может запретить доступ к сети, даже если она есть в AllowedIPs.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['0.0.0.0/0 — весь IPv4-трафик через VPN', '192.168.50.0/24 — только одна удалённая сеть'],
|
||||
'warning': ''},
|
||||
{'title': 'Группы клиентов',
|
||||
'paragraphs': ['Группа позволяет один раз настроить правила и шаблон, а затем использовать их для нескольких клиентов.'],
|
||||
'bullets': ['Группа может задавать доступ в Интернет, локальные сети, дополнительные разрешения и запреты.',
|
||||
'Также группа хранит шаблон клиентского конфига: маршруты, DNS и Keepalive.',
|
||||
'Изменение политики группы применяется на сервере сразу, а уже установленный конфиг на телефоне не меняется сам.',
|
||||
'Если нужно обновить клиентский конфиг по новому шаблону группы, примените шаблон и выдайте новый файл или QR.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Группа «Гости»', 'Интернет: разрешён', 'Локальная сеть: запрещена', 'Клиенты: Phone-1, Tablet-1'],
|
||||
'warning': ''},
|
||||
{'title': 'Индивидуальные права клиента',
|
||||
'paragraphs': ['Для отдельного клиента можно наследовать политику группы или задать собственные исключения.'],
|
||||
'bullets': ['Разрешение или запрет конкретного адреса у клиента имеет приоритет над общим исключением группы.',
|
||||
'Так удобно открыть одному сотруднику сервер, который закрыт остальным членам группы.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Группа запрещает 192.168.1.0/24', 'Клиенту дополнительно разрешено 192.168.1.50/32'],
|
||||
'warning': ''},
|
||||
{'title': 'Site-to-Site клиент',
|
||||
'paragraphs': ['Выбирайте Site-to-Site, если за peer находится целая сеть. В поле удалённых сетей перечислите сети, доступные '
|
||||
'через этот peer.'],
|
||||
'bullets': ['WGTools добавит эти сети в серверные маршруты автоматически.',
|
||||
'Такие сети затем могут быть опубликованы через Nodes.',
|
||||
'Обычному телефону или ноутбуку Site-to-Site не нужен.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Peer роутера: 10.0.0.20/32', 'Удалённая сеть: 192.168.50.0/24'],
|
||||
'warning': ''},
|
||||
{'title': 'Прямое подключение и VPS Relay',
|
||||
'paragraphs': ['Если для текущего интерфейса настроен VPS Relay, клиент можно направить к серверу напрямую или через Relay.'],
|
||||
'bullets': ['«Напрямую» подходит, когда WireGuard-порт сервера доступен из Интернета.',
|
||||
'Relay полезен за CGNAT или когда прямой входящий UDP недоступен.',
|
||||
'Права клиента и его VPN-адрес при этом остаются теми же.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'PSK, изоляция и смена ключей',
|
||||
'paragraphs': ['WireGuard уже использует ключи шифрования. Дополнительный PSK добавляет ещё один общий секрет между сервером и '
|
||||
'клиентом.'],
|
||||
'bullets': ['Изоляция клиента запрещает ему общаться с другими VPN-адресами того же WireGuard-пула.',
|
||||
'«Сменить ключи» создаёт новую ключевую пару и новый PSK, если он включён.',
|
||||
'После смены ключей старый конфиг перестаёт работать — нужно выдать новый файл или QR.',
|
||||
'VPN-адрес, группа, расписание и статистика при смене ключей сохраняются.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Временный доступ',
|
||||
'paragraphs': ['Клиенту можно задать срок: 1, 3, 6 часов, 1 день или своё время.'],
|
||||
'bullets': ['После окончания срока WGTools либо отключит доступ, сохранив клиента, либо выполнит выбранное действие.',
|
||||
'Проверка сроков выполняется автоматически отдельной службой.',
|
||||
'Чтобы вернуть сохранённому отключённому клиенту доступ, задайте новый срок или «Без ограничения».'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Расписание доступа',
|
||||
'paragraphs': ['Расписание автоматически разрешает и блокирует клиента в выбранные дни и часы без замены его конфига.'],
|
||||
'bullets': ['Используется локальное время WireGuard-сервера.',
|
||||
'Можно задавать интервалы через полночь, например 22:00–06:00.',
|
||||
'Когда разрешённый интервал начинается снова, WGTools возвращает тот же peer.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Пн–Пт: 08:00–19:00'],
|
||||
'warning': ''},
|
||||
{'title': 'Статус, Endpoint и трафик',
|
||||
'paragraphs': ['В таблице видны последний handshake, Endpoint и накопленный RX/TX.'],
|
||||
'bullets': ['Свежий handshake означает, что клиент недавно связывался с сервером.',
|
||||
'Endpoint может меняться у мобильного телефона при переходе между Wi-Fi и LTE — это нормально.',
|
||||
'Быстрый поиск помогает найти клиента по имени, адресу, группе или состоянию.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Конфиг и QR',
|
||||
'paragraphs': ['Файл .conf подходит для компьютеров и роутеров, QR удобен для приложения WireGuard на телефоне.'],
|
||||
'bullets': ['PrivateKey клиента находится внутри конфига и QR — относитесь к ним как к паролю.',
|
||||
'Повторная выдача управляемого клиента использует сохранённые WGTools ключи.',
|
||||
'После смены ключей обязательно выдайте новый конфиг.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Изменение и удаление',
|
||||
'paragraphs': ['WGTools делает резервную копию перед изменением WireGuard-конфига и применяет изменения через безопасный '
|
||||
'sync/restart.'],
|
||||
'bullets': ['При удалении управляемого клиента удаляются его peer, сохранённые ключи и связанные управляемые правила.',
|
||||
'Удаление клиента не стирает конфиг, который уже сохранён на телефоне, но этот конфиг больше не сможет '
|
||||
'подключиться.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''}]},
|
||||
{'id': 'settings',
|
||||
'title': 'Настройки',
|
||||
'intro': 'Здесь находятся внешний вид WGTools, резервные копии, Telegram, почта, HTTPS, пользователи, аудит и обновления.',
|
||||
'topics': [{'title': 'Оформление и язык',
|
||||
'paragraphs': ['Можно выбрать светлую, тёмную или системную тему и язык интерфейса.'],
|
||||
'bullets': ['«Свернуть панель» оставляет в боковом меню только значки.',
|
||||
'Состояние боковой панели хранится в текущем браузере и применяется сразу.',
|
||||
'Язык интерфейса сохраняется в WGTools.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Частота обновления статуса',
|
||||
'paragraphs': ['Интервал определяет, как часто страницы обновляют состояние клиентов и сервера. Порог Online определяет, '
|
||||
'сколько времени после handshake клиент считается подключённым.'],
|
||||
'bullets': [],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Обновление: 5 сек', 'Online: 180 сек'],
|
||||
'warning': ''},
|
||||
{'title': 'Автоматические резервные копии',
|
||||
'paragraphs': ['Перед опасными изменениями WGTools сохраняет историю WireGuard-конфигураций. Это быстрый способ откатить '
|
||||
'неудачное изменение одного интерфейса.'],
|
||||
'bullets': ['Можно настроить количество хранимых копий.', 'Эта история не заменяет полный переносимый backup всего WGTools.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Полный backup и восстановление',
|
||||
'paragraphs': ['Файл .wgtbackup предназначен для переезда на новый сервер или аварийного восстановления.'],
|
||||
'bullets': ['В него входят конфигурации WireGuard, база пользователей и настроек, группы, данные управляемых клиентов, '
|
||||
'Telegram/SMTP и состояние VPS Relay/Nodes, необходимое для восстановления.',
|
||||
'Перед restore WGTools проверяет архив и создаёт страховочную копию текущего состояния.',
|
||||
'Если применение восстановленных данных не удалось, выполняется автоматический откат.',
|
||||
'После успешного восстановления текущая веб-сессия завершается — войдите пользователем из восстановленной базы.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': 'В .wgtbackup находятся приватные ключи, PSK, хэши паролей, Telegram-токен и SMTP-пароль. Храните файл как пароль.'},
|
||||
{'title': 'Telegram Bot',
|
||||
'paragraphs': ['Telegram позволяет проверить сервер и управлять WireGuard без открытия веб-панели.'],
|
||||
'bullets': ['Создайте бота через @BotFather и вставьте Bot Token.',
|
||||
'Включите бота и отправьте ему /start.',
|
||||
'Если ваш Telegram user ID ещё не разрешён, бот покажет числовой ID. Добавьте его в список разрешённых ID.',
|
||||
'Бот принимает команды управления только в личном чате.',
|
||||
'Через бот доступны состояние сервера, клиенты, создание/удаление, выдача конфига/QR и управление WireGuard.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['Endpoint по умолчанию: vpn.example.com', 'DNS: 1.1.1.1, 8.8.8.8'],
|
||||
'warning': ''},
|
||||
{'title': 'Почта / SMTP и восстановление пароля',
|
||||
'paragraphs': ['SMTP нужен для функции «Забыли пароль?» на странице входа.'],
|
||||
'bullets': ['Поддерживаются STARTTLS, TLS/SSL и SMTP без шифрования для доверенной локальной сети.',
|
||||
'Логин может быть пустым, если ваш SMTP-сервер не требует авторизации.',
|
||||
'Пароль сохраняется локально и обратно в браузер не возвращается.',
|
||||
'Кнопка теста отправляет письмо на указанный тестовый адрес.',
|
||||
'Код восстановления одноразовый, хранится в виде хэша, действует 15 минут и имеет ограничение числа попыток.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Встроенный HTTPS',
|
||||
'paragraphs': ['WGTools может сам обслуживать HTTPS без Nginx, Caddy или другого reverse proxy.'],
|
||||
'bullets': ['Сначала заполните домен/публичный IP, e-mail, HTTPS-порт и private path, затем нажмите «Получить / обновить сертификат». Эта кнопка одновременно сохраняет введённые настройки.',
|
||||
'Пока подходящего сертификата нет, флажок «Включить встроенный HTTPS» недоступен. После успешного выпуска сертификата включите его и нажмите «Сохранить».',
|
||||
'Если изменить домен или публичный IP, WGTools попросит получить сертификат для нового адреса перед включением HTTPS.',
|
||||
'Для выпуска и автопродления Let’s Encrypt TCP 80 должен быть доступен из Интернета до этого сервера.',
|
||||
'Панель работает на выбранном HTTPS-порту, например 443 или 8443.',
|
||||
'Private path задаёт адрес панели, например /MyWGTools/. При включённом HTTPS запросы к другим путям получают 404.',
|
||||
'WGTools показывает локальную занятость портов и не останавливает чужой веб-сервер.',
|
||||
'Сертификат автоматически продлевается отдельным systemd timer.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['https://wg.example.com/MyWGTools/'],
|
||||
'warning': 'Private path не заменяет пароль. Не публикуйте адрес панели без необходимости и используйте сильные учётные '
|
||||
'данные.'},
|
||||
{'title': 'Пользователи',
|
||||
'paragraphs': ['Первый пользователь создаётся при первом запуске WGTools. Дополнительных пользователей можно добавить в '
|
||||
'Настройках.'],
|
||||
'bullets': ['Сейчас пользователи имеют одинаковые права управления.',
|
||||
'Можно менять E-mail и пароль, а также удалять пользователей.',
|
||||
'Для своей учётной записи можно включить MFA через Google Authenticator или другое TOTP-приложение. При включении WGTools показывает одноразовый набор резервных кодов.',
|
||||
'Если устройство с Authenticator потеряно, root может аварийно отключить MFA для выбранного пользователя через CLI wgtools.',
|
||||
'Текущего пользователя и последнего оставшегося пользователя удалить нельзя.',
|
||||
'Смена или восстановление пароля, включение или отключение MFA завершает старые веб-сессии этого пользователя.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Аудит',
|
||||
'paragraphs': ['Аудит показывает важные действия в панели, Telegram и историю значимых подключений WireGuard.'],
|
||||
'bullets': ['Для веб-действий сохраняется имя пользователя WGTools.',
|
||||
'Для Telegram сохраняются @username, если доступен, и числовой Telegram ID.',
|
||||
'Отмечаются изменения конфигурации, выдача клиентского конфига/QR, обновления и полезные ошибки.',
|
||||
'Пароли, приватные ключи, PSK, токены и содержимое конфигов в аудит не записываются.',
|
||||
'Журнал хранится ограниченное время и очищается автоматически.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Обновления WGTools',
|
||||
'paragraphs': ['WGTools периодически проверяет стабильные GitHub Releases, но никогда не устанавливает обновление без вашего '
|
||||
'подтверждения.'],
|
||||
'bullets': ['При наличии новой версии появляется уведомление в боковой панели.',
|
||||
'Перед обновлением создаётся полный .wgtbackup и отдельный архив приложения для rollback.',
|
||||
'Если новая версия не запустилась, WGTools пытается автоматически вернуть предыдущую.',
|
||||
'Версию можно увидеть в шапке/боковой панели и в разделе «О программе».'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Команда wgtools и аварийный доступ',
|
||||
'paragraphs': ['После установки доступна команда wgtools от root. Она полезна, если веб-панель недоступна.'],
|
||||
'bullets': ['Команда показывает состояние WGTools, WireGuard, Nodes, Telegram, таймеров, локального Relay Agent и текущий URL панели.',
|
||||
'Из неё можно запустить, остановить или перезапустить панель и WireGuard, посмотреть логи.',
|
||||
'Если ошиблись с HTTPS-портом или private path, CLI позволяет отключить встроенный HTTPS и вернуть HTTP-доступ.',
|
||||
'В разделе Security можно аварийно отключить MFA для выбранного пользователя, если потерян доступ к Google Authenticator и резервным кодам.',
|
||||
'Пункт «Uninstall WGTools» удаляет панель и её службы, но сохраняет обычный WireGuard и данные для возможной переустановки.',
|
||||
'Пункт «FULL CLEANUP» полностью очищает этот сервер от WGTools, локального Relay и WireGuard; перед выполнением требуется ввести DELETE ALL. Удалённые Relay на других VPS не затрагиваются.'],
|
||||
'example_title': 'Пример',
|
||||
'example_lines': ['root@server:~# wgtools'],
|
||||
'warning': ''},
|
||||
{'title': 'Где хранятся данные',
|
||||
'paragraphs': ['Обычно вручную редактировать эти файлы не требуется, но пути полезны для диагностики и резервного копирования.'],
|
||||
'bullets': [],
|
||||
'example_title': 'Основные пути',
|
||||
'example_lines': ['/etc/wireguard/wg0.conf — конфигурация WireGuard',
|
||||
'/var/lib/wgtools/wgtools.db — пользователи и настройки',
|
||||
'/var/lib/wgtools/clients/ — данные управляемых клиентов',
|
||||
'/var/lib/wgtools/backups/ — история конфигураций',
|
||||
'/var/lib/wgtools/update-backups/ — rollback-копии обновлений'],
|
||||
'warning': ''}]}],
|
||||
'en': [{'id': 'dashboard',
|
||||
'title': 'Dashboard',
|
||||
'intro': 'Dashboard answers three quick questions: is WireGuard running, who is connected, and is the server itself healthy?',
|
||||
'topics': [{'title': 'Where to start',
|
||||
'paragraphs': ['The top bar shows the currently selected WireGuard interface. If several interfaces exist, the main WGTools '
|
||||
'pages work with the selected one.'],
|
||||
'bullets': ['Start brings WireGuard up, Stop takes it down, and Restart briefly restarts the interface.',
|
||||
'Phones and computers normally reconnect automatically after a restart.',
|
||||
'When the interface is stopped, its clients cannot connect.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['wg0 · Home · 10.0.0.1/24 · UDP 51820'],
|
||||
'warning': ''},
|
||||
{'title': 'CPU, memory, network and uptime',
|
||||
'paragraphs': ['These values describe the whole Debian host, not just WireGuard.'],
|
||||
'bullets': ['CPU shows current processor load.',
|
||||
'Memory shows used and total RAM.',
|
||||
'Network shows current receive/transmit rate on the external interface.',
|
||||
'Uptime is the time since the operating system last booted.',
|
||||
'Rolling daily charts help spot unusual load or sustained network activity.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Who is connected',
|
||||
'paragraphs': ['WireGuard does not keep a traditional web-style session. WGTools considers a client online when its latest '
|
||||
'handshake is recent enough.'],
|
||||
'bullets': ['Handshake is the latest successful WireGuard control exchange.',
|
||||
'Endpoint is the public IP and port the client currently uses.',
|
||||
'Never means the server has not yet seen a successful handshake from that peer.',
|
||||
'Quick search filters by name, VPN address, type and Endpoint.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Phone · 10.0.0.3/32', 'Endpoint: 203.0.113.25:63275', 'Handshake: 18 s ago'],
|
||||
'warning': ''},
|
||||
{'title': 'Traffic',
|
||||
'paragraphs': ['WGTools keeps persistent RX/TX totals separately from the temporary counters exposed by WireGuard, so '
|
||||
'statistics survive interface and server restarts.'],
|
||||
'bullets': ['The Traffic card shows accumulated data for the selected interface.',
|
||||
'Each client also has its own accumulated RX/TX.',
|
||||
'Reset starts the interface and client totals again from the current moment.',
|
||||
'RX/TX on the Network card is the current speed, not the accumulated total.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Multiple WireGuard interfaces',
|
||||
'paragraphs': ['One server can host several independent VPNs, for example Home and Work.'],
|
||||
'bullets': ['Switching the top selector does not change configuration; it only chooses what Dashboard, Server and Clients '
|
||||
'currently display.',
|
||||
'Every interface has its own addresses, port, clients, routes and access rules.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['wg0 · Home · 10.0.0.1/24', 'wg1 · Work · 10.0.1.1/24'],
|
||||
'warning': ''}]},
|
||||
{'id': 'server',
|
||||
'title': 'Server',
|
||||
'intro': 'Server controls WireGuard itself: interfaces, routing, network access, linking multiple WGTools installations with Nodes, and '
|
||||
'public access through VPS Relay.',
|
||||
'topics': [{'title': 'VPN networks and WireGuard interfaces',
|
||||
'paragraphs': ['Think of a WireGuard interface as a virtual network card with its own small VPN subnet. Each client receives an '
|
||||
'address from that subnet.'],
|
||||
'bullets': ['System names are usually wg0, wg1 and so on.',
|
||||
'A display name such as Home or Office is only for convenience.',
|
||||
'ListenPort is the UDP port clients connect to.',
|
||||
'MTU can normally stay on Auto; set it manually only when a particular network, LTE connection or PPPoE requires '
|
||||
'it.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['VPN network: 10.0.0.0/24',
|
||||
'Server address: 10.0.0.1/24',
|
||||
'Clients: 10.0.0.2, 10.0.0.3, ...',
|
||||
'Port: UDP 51820'],
|
||||
'warning': ''},
|
||||
{'title': 'First setup and additional interfaces',
|
||||
'paragraphs': ['On a clean Debian host, WGTools can install WireGuard and create the first interface with a guided form. You '
|
||||
'can later add wg1, wg2 and more.'],
|
||||
'bullets': ['WGTools suggests a free VPN subnet, UDP port and policy-routing table.',
|
||||
'Overlapping networks and occupied ports are checked before creation.',
|
||||
'Every interface receives its own keys and configuration.',
|
||||
'Deleting an interface creates a backup first and removes its managed data.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'NAT in plain language',
|
||||
'paragraphs': ['NAT/MASQUERADE is useful when a VPN client should reach the LAN or Internet using the WireGuard server as its '
|
||||
'visible source. For a typical home setup this is often the simplest option.'],
|
||||
'bullets': ['With NAT enabled, the home router normally does not need a separate return route to the VPN subnet.',
|
||||
'With NAT disabled, true routed networking requires return routes on the neighboring routers.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Phone 10.0.0.3 → WGTools 192.168.1.10 → Internet', 'Home router sees source 192.168.1.10'],
|
||||
'warning': ''},
|
||||
{'title': 'Routes and policy routing',
|
||||
'paragraphs': ['A route tells Linux which interface or gateway leads to a network. Policy routing adds a separate routing table '
|
||||
'for selected traffic, such as traffic from VPN clients.'],
|
||||
'bullets': ['A simple home installation often does not need a separate policy table.',
|
||||
'It is useful when VPN clients must use a specific gateway, another VPN or a dedicated WAN.',
|
||||
'WGTools distinguishes system routes, Site-to-Site routes and manually created routes.',
|
||||
'Custom routes can be added, edited and deleted in the UI.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Source: 10.0.0.0/24', 'Table: 200', 'Default via: 192.168.1.1 dev eth0'],
|
||||
'warning': ''},
|
||||
{'title': 'Firewall and network access',
|
||||
'paragraphs': ['Firewall rules decide whether traffic is allowed. Routing only decides where traffic goes; these are separate '
|
||||
'concerns.'],
|
||||
'bullets': ['You can allow or block a particular VPN client or network.',
|
||||
'Group policy and per-client exceptions are generated by WGTools automatically.',
|
||||
'Before applying changes, WGTools backs up the configuration and rolls back if WireGuard cannot start.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['10.0.0.6/32 → block → 192.168.1.0/24', 'Other clients can still reach the LAN'],
|
||||
'warning': ''},
|
||||
{'title': 'Site-to-Site: connect two normal networks',
|
||||
'paragraphs': ['Site-to-Site is for a peer that represents an entire remote network instead of a single phone or laptop.'],
|
||||
'bullets': ['Enter the networks behind that peer as Remote Networks and WGTools creates the routes automatically.',
|
||||
'A peer going offline does not remove those configured routes.',
|
||||
'The remote side also needs a return route through WireGuard.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Home: 192.168.1.0/24',
|
||||
'Office peer: 10.0.0.20/32',
|
||||
'Office LAN: 192.168.50.0/24',
|
||||
'Result: home devices can reach 192.168.50.x'],
|
||||
'warning': ''},
|
||||
{'title': 'WGTools Nodes: link several WGTools servers',
|
||||
'paragraphs': ['Nodes connects several WGTools installations through a dedicated internal WireGuard tunnel. One installation '
|
||||
'becomes the HUB and the others join it with a one-time code.'],
|
||||
'bullets': ['The HUB uses one port number: UDP for WireGuard and TCP for the initial protected pairing.',
|
||||
'After pairing, service synchronization stays inside wgnode0 and does not depend on the web-panel URL, HTTPS port '
|
||||
'or private path.',
|
||||
'WGTools pre-fills detected VPN, Site-to-Site and local networks. Keep only the networks you actually want to '
|
||||
'publish.',
|
||||
'A network discovered later is not published silently; add it explicitly in Node settings. If a VPN pool, Site-to-Site network or LAN changes after saving, WGTools shows a warning to review the list.',
|
||||
'Published networks on different Nodes must not overlap. For example, if Home and VPS both publish 10.0.0.0/24, WGTools blocks the change and identifies the conflict.',
|
||||
'Details shows remote networks and clients in read-only mode.',
|
||||
'Publishing a network makes it reachable to connected nodes, so publish only what is required.'],
|
||||
'example_title': 'Example: home + VPS',
|
||||
'example_lines': ['HUB: vpn.example.com:51950',
|
||||
'Home publishes: 192.168.1.0/24',
|
||||
'VPS publishes: 10.20.0.0/24',
|
||||
'After pairing both sides route through wgnode0'],
|
||||
'warning': ''},
|
||||
{'title': 'VPS Relay: when home has no public IP',
|
||||
'paragraphs': ['VPS Relay helps when clients cannot reach WGTools directly from the Internet, for example behind CGNAT. A '
|
||||
'public VPS becomes the entry point while the WireGuard server and access policy stay on your WGTools host.'],
|
||||
'bullets': ['Add the VPS over SSH: WGTools checks the host and ports first, then installs the Relay Agent.',
|
||||
'One Relay Agent can serve several independent WGTools controllers with isolated connections and keys.',
|
||||
'Supported clients can then use a direct connection or VPS Relay.',
|
||||
'Removing a VPS from WGTools detaches the local transport but leaves the Relay Agent and saved tenant on the VPS so '
|
||||
'it can be reconnected.',
|
||||
'VPS Relay and Nodes solve different problems: Relay provides a public entry point for clients; Nodes links WGTools '
|
||||
'servers and their networks.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Phone → public VPS → protected Relay transport → home WGTools → required network'],
|
||||
'warning': ''},
|
||||
{'title': 'Diagnostics',
|
||||
'paragraphs': ['Diagnostics checks WireGuard state, IP forwarding, ports, routes and related system services. It is useful when '
|
||||
'a client cannot connect or a routed network is unreachable.'],
|
||||
'bullets': ['First check whether the interface is running and a fresh handshake exists.',
|
||||
'If the handshake works but the destination does not, the remaining issue is usually routing, firewall or the '
|
||||
'return path.',
|
||||
'The Server → Trace tab shows each responding traceroute hop, average RTT and latency increase versus the previous responding hop. Route/table colors make sharp latency growth easy to spot, while hops that simply do not answer traceroute probes are shown neutrally.',
|
||||
'The interactive map supports pan and zoom; clicking a hop shows its IP, approximate location, ASN/provider and RTT.',
|
||||
'When the map is enabled, public hop IPs are geolocated through ipwho.is and tiles are loaded from OpenStreetMap; private addresses are not sent for geolocation.',
|
||||
'Traceroute measures latency, not real link throughput in Mbit/s.',
|
||||
'Diagnostics does not change configuration by itself.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Safe apply',
|
||||
'paragraphs': ['Server, route and firewall changes briefly restart WireGuard when needed.'],
|
||||
'bullets': ['WGTools creates a configuration backup first.',
|
||||
'If the new configuration fails to start, WGTools attempts to restore the previous one automatically.',
|
||||
'Connected clients briefly disconnect and normally reconnect on their own.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Config tab',
|
||||
'paragraphs': ['This is a direct editor for /etc/wireguard/<interface>.conf when you need something the normal WGTools forms do '
|
||||
'not expose.'],
|
||||
'bullets': ['Use it only if you understand WireGuard syntax and PostUp/PostDown commands.',
|
||||
'WGTools validates and backs up the file before applying it.',
|
||||
'When a non-standard configuration is detected, some automatic editing can be limited to avoid damaging manual '
|
||||
'rules.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['[Interface]', 'Address = 10.0.0.1/24', 'ListenPort = 51820', '', '[Peer]', 'AllowedIPs = 10.0.0.2/32'],
|
||||
'warning': 'Do not publish or share PrivateKey, PresharedKey or other secrets.'}]},
|
||||
{'id': 'clients',
|
||||
'title': 'Clients',
|
||||
'intro': 'A client can be a phone, laptop, router or any other WireGuard peer. This page creates configurations, access policies, '
|
||||
'expiration rules, schedules and Site-to-Site links.',
|
||||
'topics': [{'title': 'Normal client',
|
||||
'paragraphs': ['Use Client for a phone or computer. WGTools allocates a free VPN address and creates the keys.'],
|
||||
'bullets': ['The name is only a label inside WGTools.',
|
||||
'Endpoint in the generated configuration is the address the device uses to find your WireGuard server.',
|
||||
'DNS can be set per client or inherited from a group template.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Name: Phone', 'VPN address: 10.0.0.3/32', 'Endpoint: vpn.example.com:51820'],
|
||||
'warning': ''},
|
||||
{'title': 'Traffic through VPN and AllowedIPs',
|
||||
'paragraphs': ['AllowedIPs in the client configuration decides what the device sends into the tunnel. It is separate from '
|
||||
'server-side access policy.'],
|
||||
'bullets': ['All traffic sends both Internet and remote-network traffic through the VPN.',
|
||||
'You can send only selected networks through the VPN.',
|
||||
'The local-network exclusion preset is useful when VPN Internet is wanted but a local printer/router should remain '
|
||||
'direct.',
|
||||
'Server policy can still block a destination even when it appears in AllowedIPs.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['0.0.0.0/0 — all IPv4 traffic through VPN', '192.168.50.0/24 — only one remote network'],
|
||||
'warning': ''},
|
||||
{'title': 'Client groups',
|
||||
'paragraphs': ['A group lets you define policy and a configuration template once and reuse it for several clients.'],
|
||||
'bullets': ['Groups can control Internet access, local-network access and additional allow/deny exceptions.',
|
||||
'They can also provide default routes, DNS and Keepalive for new client configurations.',
|
||||
'Changing group server policy applies immediately, but a configuration already installed on a phone is not silently '
|
||||
'rewritten.',
|
||||
'Apply the current group template and issue a new file/QR when the device configuration itself must change.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Group “Guests”', 'Internet: allowed', 'LAN: blocked', 'Members: Phone-1, Tablet-1'],
|
||||
'warning': ''},
|
||||
{'title': 'Per-client policy',
|
||||
'paragraphs': ['A client can inherit the group policy or add its own exceptions.'],
|
||||
'bullets': ['A per-client allow or deny exception takes priority over the matching group exception.',
|
||||
'This is useful when one employee needs a server that remains blocked for the rest of the group.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Group blocks 192.168.1.0/24', 'Client additionally allows 192.168.1.50/32'],
|
||||
'warning': ''},
|
||||
{'title': 'Site-to-Site client',
|
||||
'paragraphs': ['Use Site-to-Site when a peer represents an entire network. Enter the networks reachable behind that peer as '
|
||||
'Remote Networks.'],
|
||||
'bullets': ['WGTools adds those networks to server routing automatically.',
|
||||
'They can later be selected for publication through Nodes.',
|
||||
'A normal phone or laptop does not need Site-to-Site mode.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Router peer: 10.0.0.20/32', 'Remote network: 192.168.50.0/24'],
|
||||
'warning': ''},
|
||||
{'title': 'Direct connection and VPS Relay',
|
||||
'paragraphs': ['When VPS Relay is installed for the selected interface, a supported client can connect directly or through '
|
||||
'Relay.'],
|
||||
'bullets': ['Direct is best when the server WireGuard port is reachable from the Internet.',
|
||||
'Relay helps behind CGNAT or when direct inbound UDP is unavailable.',
|
||||
'The client VPN address and access policy remain unchanged.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'PSK, isolation and key rotation',
|
||||
'paragraphs': ['WireGuard already uses public/private keys. An optional PSK adds another shared secret between server and '
|
||||
'client.'],
|
||||
'bullets': ['Client isolation blocks this client from talking to other VPN addresses in the same WireGuard pool.',
|
||||
'Rotate keys creates a new key pair and a new PSK when PSK is enabled.',
|
||||
'The old configuration stops working after rotation, so issue a new file or QR.',
|
||||
'VPN address, group, schedule and traffic history are preserved.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Temporary access',
|
||||
'paragraphs': ['A client can expire after 1, 3 or 6 hours, one day, or a custom date/time.'],
|
||||
'bullets': ['When the time is reached, WGTools performs the selected expiration action.',
|
||||
'Expiration is enforced automatically by a background service.',
|
||||
'To re-enable a saved expired client, set a new expiration time or No limit.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Access schedule',
|
||||
'paragraphs': ['A schedule automatically enables and blocks a client on selected days and times without replacing its '
|
||||
'configuration.'],
|
||||
'bullets': ['It uses the WireGuard server local time.',
|
||||
'Intervals can cross midnight, for example 22:00–06:00.',
|
||||
'When the allowed period starts again, WGTools restores the same peer.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Mon–Fri: 08:00–19:00'],
|
||||
'warning': ''},
|
||||
{'title': 'Status, Endpoint and traffic',
|
||||
'paragraphs': ['The table shows latest handshake, Endpoint and accumulated RX/TX.'],
|
||||
'bullets': ['A recent handshake means the client communicated with the server recently.',
|
||||
'A mobile phone Endpoint can change when moving between Wi-Fi and LTE; that is normal.',
|
||||
'Quick search filters by name, address, group and state.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Configuration and QR',
|
||||
'paragraphs': ['A .conf file is convenient for computers and routers; QR is convenient for the WireGuard mobile app.'],
|
||||
'bullets': ['The client PrivateKey is inside the file and QR, so treat them like a password.',
|
||||
'Reissuing a managed client configuration uses keys stored by WGTools.',
|
||||
'After rotating keys, always issue a new configuration.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Edit and delete',
|
||||
'paragraphs': ['WGTools backs up the WireGuard configuration before managed changes and applies them safely.'],
|
||||
'bullets': ['Deleting a managed client removes its peer, saved keys and related managed rules.',
|
||||
'A configuration already saved on the device is not erased remotely, but it can no longer connect.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''}]},
|
||||
{'id': 'settings',
|
||||
'title': 'Settings',
|
||||
'intro': 'Settings contains appearance, backups, Telegram, mail, HTTPS, users, audit and application updates.',
|
||||
'topics': [{'title': 'Appearance and language',
|
||||
'paragraphs': ['Choose light, dark or system theme and the interface language.'],
|
||||
'bullets': ['Collapse sidebar keeps only icons in the left navigation.',
|
||||
'Sidebar state is stored in the current browser and changes immediately.',
|
||||
'The interface language is saved by WGTools.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Status refresh',
|
||||
'paragraphs': ['Refresh interval controls how often pages update server/client status. Online threshold controls how long after '
|
||||
'a handshake a peer is considered connected.'],
|
||||
'bullets': [],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Refresh: 5 s', 'Online: 180 s'],
|
||||
'warning': ''},
|
||||
{'title': 'Automatic configuration backups',
|
||||
'paragraphs': ['Before risky changes, WGTools keeps a history of WireGuard configurations. This is a quick rollback mechanism '
|
||||
'for one interface.'],
|
||||
'bullets': ['You can choose how many copies are retained.', 'This history is different from the full portable WGTools backup.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Full backup and restore',
|
||||
'paragraphs': ['A .wgtbackup file is for migration to a new server or disaster recovery.'],
|
||||
'bullets': ['It contains WireGuard configurations, users/settings database, groups, managed-client data, Telegram/SMTP settings '
|
||||
'and the state needed to restore VPS Relay/Nodes.',
|
||||
'Before restore, WGTools validates the archive and makes a safety backup of the current state.',
|
||||
'If applying restored data fails, WGTools automatically attempts to roll back.',
|
||||
'After a successful restore the current web session is cleared; sign in with an account from the restored '
|
||||
'database.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': 'A .wgtbackup contains private keys, PSKs, password hashes, Telegram token and SMTP password. Store it like a '
|
||||
'password.'},
|
||||
{'title': 'Telegram Bot',
|
||||
'paragraphs': ['Telegram can check and manage WireGuard without opening the web panel.'],
|
||||
'bullets': ['Create a bot with @BotFather and paste its Bot Token.',
|
||||
'Enable it and send /start.',
|
||||
'If your Telegram user ID is not authorized yet, the bot shows the numeric ID. Add it to the allowed list.',
|
||||
'Management commands are accepted only in private chats.',
|
||||
'Available actions include server status, clients, create/delete, configuration/QR reissue and WireGuard controls.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['Default Endpoint: vpn.example.com', 'DNS: 1.1.1.1, 8.8.8.8'],
|
||||
'warning': ''},
|
||||
{'title': 'Mail / SMTP and password recovery',
|
||||
'paragraphs': ['SMTP powers the Forgot password? flow on the sign-in page.'],
|
||||
'bullets': ['STARTTLS, TLS/SSL and plain SMTP for a trusted local network are supported.',
|
||||
'Username can be empty when the SMTP server does not require authentication.',
|
||||
'The password is stored locally and is never returned to the browser.',
|
||||
'The test button sends a message to the chosen test recipient.',
|
||||
'Recovery codes are one-time, hashed, valid for 15 minutes and rate-limited.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Built-in HTTPS',
|
||||
'paragraphs': ['WGTools can serve HTTPS directly without Nginx, Caddy or another reverse proxy.'],
|
||||
'bullets': ['First enter the domain/public IP, e-mail, HTTPS port and private path, then click Obtain / renew certificate. That action also saves the entered HTTPS settings.',
|
||||
'Until a suitable certificate exists, Enable built-in HTTPS stays unavailable. After successful issuance, enable it and click Save.',
|
||||
'If the domain or public IP changes, WGTools requires a certificate for the new address before HTTPS can be enabled.',
|
||||
'For issuance and renewal, TCP 80 must be reachable from the Internet to this server.',
|
||||
'The panel uses the chosen HTTPS port, such as 443 or 8443.',
|
||||
'Private path sets the panel URL, for example /MyWGTools/. Other paths return 404 while built-in HTTPS is enabled.',
|
||||
'WGTools reports local port usage and never stops an unrelated web server.',
|
||||
'A systemd timer renews the certificate automatically.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['https://wg.example.com/MyWGTools/'],
|
||||
'warning': 'A private path does not replace authentication. Avoid exposing the panel unnecessarily and use strong credentials.'},
|
||||
{'title': 'Users',
|
||||
'paragraphs': ['The first user is created during initial WGTools setup. Additional users can be added in Settings.'],
|
||||
'bullets': ['Users currently have equal management rights.',
|
||||
'E-mail and password can be changed and users can be removed.',
|
||||
'Each user can enable MFA for their own account with Google Authenticator or another TOTP-compatible app. WGTools shows a one-time set of recovery codes when MFA is enabled.',
|
||||
'If the authenticator device is lost, root can disable MFA for a selected user from the wgtools CLI.',
|
||||
'The current user and the last remaining user cannot be deleted.',
|
||||
'Password change/recovery and enabling/disabling MFA invalidate older web sessions for that user.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'Audit',
|
||||
'paragraphs': ['Audit shows meaningful web/Telegram administration actions and useful WireGuard connection history.'],
|
||||
'bullets': ['Web actions record the WGTools username.',
|
||||
'Telegram actions record @username when available and the numeric Telegram ID.',
|
||||
'Configuration changes, client configuration/QR disclosure, updates and useful failures are recorded.',
|
||||
'Passwords, private keys, PSKs, tokens and full configuration contents are not written to Audit.',
|
||||
'The journal has limited retention and is cleaned automatically.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'WGTools updates',
|
||||
'paragraphs': ['WGTools periodically checks stable GitHub Releases but never installs an update without explicit confirmation.'],
|
||||
'bullets': ['An update notice appears in the sidebar when a newer version exists.',
|
||||
'Before updating, WGTools creates a full .wgtbackup and a separate application rollback archive.',
|
||||
'If the new application does not start, WGTools attempts to restore the previous version automatically.',
|
||||
'The current version is shown in the UI and under About.'],
|
||||
'example_title': '',
|
||||
'example_lines': [],
|
||||
'warning': ''},
|
||||
{'title': 'wgtools command and emergency access',
|
||||
'paragraphs': ['The root command wgtools is installed with the application and is useful when the web panel is unreachable.'],
|
||||
'bullets': ['It shows WGTools, WireGuard, Nodes, Telegram, timer and local Relay Agent status plus the current panel URL.',
|
||||
'It can start/stop/restart the panel and WireGuard and show logs.',
|
||||
'If an HTTPS port or private path was configured incorrectly, the CLI can disable built-in HTTPS and restore HTTP access.',
|
||||
'The Security section can emergency-disable MFA for a selected user if Google Authenticator and recovery codes are unavailable.',
|
||||
'Uninstall WGTools removes the panel and its services while keeping normal WireGuard and reusable WGTools data for a later reinstall.',
|
||||
'FULL CLEANUP wipes WGTools, local Relay and WireGuard from this host after an explicit DELETE ALL confirmation; Relay Agents on other VPS hosts are never touched.'],
|
||||
'example_title': 'Example',
|
||||
'example_lines': ['root@server:~# wgtools'],
|
||||
'warning': ''},
|
||||
{'title': 'Where data is stored',
|
||||
'paragraphs': ['Manual editing is normally unnecessary, but these paths are useful for troubleshooting and backup planning.'],
|
||||
'bullets': [],
|
||||
'example_title': 'Main paths',
|
||||
'example_lines': ['/etc/wireguard/wg0.conf — WireGuard configuration',
|
||||
'/var/lib/wgtools/wgtools.db — users and settings',
|
||||
'/var/lib/wgtools/clients/ — managed client data',
|
||||
'/var/lib/wgtools/backups/ — configuration history',
|
||||
'/var/lib/wgtools/update-backups/ — update rollback archives'],
|
||||
'warning': ''}]}]}
|
||||
|
||||
|
||||
# Larger help articles are localized separately from short UI translation keys.
|
||||
# The original Russian and English help above is retained as the reference/fallback.
|
||||
import json as _help_json
|
||||
from pathlib import Path as _HelpPath
|
||||
|
||||
_HELP_TRANSLATION_PATH = _HelpPath(__file__).with_name('help_locales')
|
||||
for _help_lang in ('de', 'fr', 'it', 'es', 'pl'):
|
||||
_help_file = _HELP_TRANSLATION_PATH / f'{_help_lang}.json'
|
||||
# Missing/corrupt optional language resources must not break panel startup.
|
||||
try:
|
||||
_help_sections = _help_json.loads(_help_file.read_text(encoding='utf-8'))
|
||||
if ([s['id'] for s in _help_sections] != [s['id'] for s in HELP['en']]
|
||||
or any(len(s['topics']) != len(reference['topics'])
|
||||
for s, reference in zip(_help_sections, HELP['en']))):
|
||||
raise ValueError('help sections do not match reference')
|
||||
HELP[_help_lang] = _help_sections
|
||||
except (OSError, ValueError, KeyError, TypeError):
|
||||
# Keep English as a safe fallback; release tests require every file to be valid.
|
||||
pass
|
||||
|
||||
def get_help_sections(language: str) -> list[dict]:
|
||||
return HELP.get(language) or HELP["en"]
|
||||
Reference in new issue
Block a user