Port Option + Systemd Capabilities in QSG

This commit is contained in:
Alexey
2026-10-29 08:02:32 +03:00
parent 6a615bd146
commit b17c50b8be
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -27,6 +27,8 @@ To modify the script’s startup parameters, you can use the following flags:
Providing all options skips interactive prompts. Providing all options skips interactive prompts.
When updating an existing configuration, an explicit `--port` or a nonempty interactive port answer changes only an existing `[server].port`. Explicit `[[server.listeners]]` ports and other sections remain unchanged. Pressing Enter or running without a terminal does not request a port change. If `[server].port` is absent, the installer warns instead of inserting it; edit explicit listeners yourself.
After completion, the script will provide a link for client connections: After completion, the script will provide a link for client connections:
```bash ```bash
tg://proxy?server=IP&port=PORT&secret=SECRET tg://proxy?server=IP&port=PORT&secret=SECRET
@@ -221,6 +223,9 @@ NoNewPrivileges=true
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
For systemd, the installer grants capabilities through `AmbientCapabilities` and `CapabilityBoundingSet`, without file capabilities on the executable. File capabilities can clear the ambient set and leave firewall helpers unprivileged. Replacing the binary with the current installer and restarting the service removes the old file attributes and applies the unit policy.
then Ctrl+S -> Ctrl+X to save then Ctrl+S -> Ctrl+X to save
reload systemd units reload systemd units
+5
View File
@@ -26,6 +26,8 @@ curl -fsSL https://raw.githubusercontent.com/telemt/telemt/main/install.sh | sh
Если заданы все параметры, интерактивных вопросов не будет. Если заданы все параметры, интерактивных вопросов не будет.
При обновлении существующей конфигурации явный `--port` или непустой ответ на запрос порта меняет только уже имеющийся `[server].port`. Порты в `[[server.listeners]]` и других секциях сохраняются. Нажатие Enter или запуск без терминала не задаёт смену порта. Если `[server].port` отсутствует, установщик выводит предупреждение и не добавляет ключ; явные listeners нужно изменить самостоятельно.
После завершения установки скрипт выдаст ссылку для подключения клиентов: После завершения установки скрипт выдаст ссылку для подключения клиентов:
```bash ```bash
tg://proxy?server=IP&port=PORT&secret=SECRET tg://proxy?server=IP&port=PORT&secret=SECRET
@@ -220,6 +222,9 @@ NoNewPrivileges=true
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
Для systemd установщик выдаёт capabilities через `AmbientCapabilities` и `CapabilityBoundingSet`, без файловых capabilities на исполняемом файле. Файловые capabilities могут очистить ambient-набор и оставить firewall helpers без нужных прав. Замена бинарника текущим установщиком и перезапуск службы удаляют прежние файловые атрибуты и применяют политику unit.
Затем нажмите Ctrl+S -> Ctrl+X, чтобы сохранить Затем нажмите Ctrl+S -> Ctrl+X, чтобы сохранить
перезагрузите конфигурацию systemd перезагрузите конфигурацию systemd