awg-ctrl: commands for the secret path, connection log, metrics, hub, check

The new features were only reachable from the web panel. awg-ctrl now has:

- panel [path new|off|<path>] — the panel address; a new random, own or no
  secret path (cli.env, panel restarted, VPN untouched);
- log [<search>] [-n N] and log seen — the connection log of this server and
  who was online when, with sen:// device and master key names from ui.db when
  the panel is on the same machine;
- metrics [token|revoke] — the metrics-only token for an external Prometheus,
  printed once with a ready prometheus.yml fragment that carries the path;
- hub [legacy on|off|auto] — nodes with and without the pre-upgrade signature
  and the HUB_LEGACY mode;
- check — what this server gives away: shared pre-randomization VPN values or
  no own I1, no secret path, plain-HTTP panel and subscription, the generic
  "sen"/"awg-node" certificate names, an open hub — each with the fix.

The interactive menu gets items 10–13: panel address and path, connection log,
who was online, and the check. Columns are padded by runes, not bytes, so
Cyrillic names line up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bNGYiDst62wH3ZGTRPFLJ
This commit is contained in:
Claude
2026-10-28 12:55:39 +00:00
parent ea07914249
commit 0a9eaa8c8e
4 changed files with 601 additions and 3 deletions
+9
View File
@@ -464,8 +464,17 @@ awg-ctrl migrate export [файл] # перенос панели (с
awg-ctrl migrate import <архив>
awg-ctrl migrate cancel
awg-ctrl update | reinstall | uninstall # обновить, переустановить, удалить (через install.sh)
awg-ctrl panel [path new|off|<путь>] # адрес панели; новый, свой или без секретного пути
awg-ctrl log [<поиск>] [-n N] # журнал VPN-подключений этого сервера
awg-ctrl log seen # кто когда был: онлайн, последний раз, не подключался
awg-ctrl metrics [token|revoke] # токен и prometheus.yml для своего Prometheus
awg-ctrl hub [legacy on|off|auto] # ноды хаба: кто с подписью, кто ещё старый
awg-ctrl check # что на сервере выдаёт его сканеру и DPI
```
В меню `awg-ctrl` те же возможности — пункты 10–13: адрес и секретный путь панели, журнал,
«кто когда был» и проверка скрытности.
`update` и `reinstall` скачивают свежий установщик (`INSTALLER_URL` в `cli.env` — своё
зеркало), `uninstall` берёт его копию из установки и работает без сети.