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:
+15
-1
@@ -495,9 +495,15 @@ func (c *CLI) interactiveMenu() {
|
||||
%s Переустановить
|
||||
%s Удалить
|
||||
%s
|
||||
%s Адрес панели и секретный путь
|
||||
%s Журнал подключений
|
||||
%s Кто когда был в VPN
|
||||
%s Проверка скрытности
|
||||
%s
|
||||
%s Выход
|
||||
|
||||
`, bold("1"), bold("2"), bold("3"), bold("4"), sep, bold("5"), bold("6"), sep, bold("7"), bold("8"), bold("9"), sep, bold("0"))
|
||||
`, bold("1"), bold("2"), bold("3"), bold("4"), sep, bold("5"), bold("6"), sep, bold("7"), bold("8"), bold("9"), sep,
|
||||
bold("10"), bold("11"), bold("12"), bold("13"), sep, bold("0"))
|
||||
}
|
||||
for {
|
||||
printMenu()
|
||||
@@ -528,6 +534,14 @@ func (c *CLI) interactiveMenu() {
|
||||
c.runInstaller("reinstall", true)
|
||||
case "9":
|
||||
c.runInstaller("uninstall", true)
|
||||
case "10":
|
||||
c.panelMenu()
|
||||
case "11":
|
||||
c.logCmd(nil)
|
||||
case "12":
|
||||
c.logCmd([]string{"seen"})
|
||||
case "13":
|
||||
c.checkCmd()
|
||||
case "0":
|
||||
os.Exit(0)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user