mirror of
https://github.com/telemt/telemt.git
synced 2026-10-31 12:52:19 +03:00
Port Option + Systemd Capabilities in QSG
This commit is contained in:
@@ -27,6 +27,8 @@ To modify the script’s startup parameters, you can use the following flags:
|
||||
|
||||
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:
|
||||
```bash
|
||||
tg://proxy?server=IP&port=PORT&secret=SECRET
|
||||
@@ -221,6 +223,9 @@ NoNewPrivileges=true
|
||||
[Install]
|
||||
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
|
||||
|
||||
reload systemd units
|
||||
|
||||
@@ -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
|
||||
tg://proxy?server=IP&port=PORT&secret=SECRET
|
||||
@@ -220,6 +222,9 @@ NoNewPrivileges=true
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Для systemd установщик выдаёт capabilities через `AmbientCapabilities` и `CapabilityBoundingSet`, без файловых capabilities на исполняемом файле. Файловые capabilities могут очистить ambient-набор и оставить firewall helpers без нужных прав. Замена бинарника текущим установщиком и перезапуск службы удаляют прежние файловые атрибуты и применяют политику unit.
|
||||
|
||||
Затем нажмите Ctrl+S -> Ctrl+X, чтобы сохранить
|
||||
|
||||
перезагрузите конфигурацию systemd
|
||||
|
||||
Reference in New Issue
Block a user