From 6a615bd1464da97b4f8b6187f9a95d5ae84f908e Mon Sep 17 00:00:00 2001 From: Alexey <247128645+axkurcom@users.noreply.github.com> Date: Thu, 29 Oct 2026 07:42:46 +0300 Subject: [PATCH] FreeBSD Daemon Init in FAQ --- docs/FAQ.en.md | 10 +++++++++- docs/FAQ.ru.md | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/FAQ.en.md b/docs/FAQ.en.md index d59b313..c481cd9 100644 --- a/docs/FAQ.en.md +++ b/docs/FAQ.en.md @@ -273,6 +273,14 @@ root hard nofile 1048576 ``` +### FreeBSD service initialization + +`telemt --init` refuses to replace any existing `/usr/local/etc/rc.d/telemt`, including a dangling symlink, before writing configuration. Manage an existing script through its package or edit it explicitly; old scripts are not migrated automatically. + +The generated rc.d script defaults to PID file `/var/run/telemt/telemt.pid` and data directory `/var/db/telemt`. It prepares the dedicated `/var/run/telemt` directory and the selected data directory with service ownership; it does not change ownership of `/var/run` itself. In `/etc/rc.conf`, use `telemt_uid`, `telemt_gid`, `telemt_pidfile`, and `telemt_data_dir` for overrides. Legacy `telemt_user` and `telemt_group` remain accepted aliases. An unspecified group follows the selected account's primary group. + +The service starts with privileges for socket setup and lets Telemt drop them when a non-root user is selected. SYN limiting with privilege dropping remains unsupported on FreeBSD and is rejected. If you override the PID path, its parent must already be writable by the service account. + ## Additional parameters ### Domain in the link instead of IP @@ -282,7 +290,7 @@ To display a domain instead of an IP address in native `tg://proxy` links, add t public_host = "proxy.example.com" ``` -This setting, together with `public_port`, affects only native links. WEB `tg://webproxy` links always use the concrete hostname from `[[web.vhosts]].host` or `hosts` and external port `443`. +This setting, together with `public_port`, affects only native links. WEB `tg://webproxy` links always use a concrete hostname and external port `443`. Startup links are emitted only for configured exact entries in `[[web.vhosts]].host` or `hosts`, never for wildcard patterns. ### Total server connection limit This parameter limits the total number of active connections to the server: diff --git a/docs/FAQ.ru.md b/docs/FAQ.ru.md index 3cddddb..4fbda47 100644 --- a/docs/FAQ.ru.md +++ b/docs/FAQ.ru.md @@ -276,6 +276,14 @@ root soft nofile 1048576 root hard nofile 1048576 ``` +### Инициализация службы на FreeBSD + +`telemt --init` отказывается заменять существующий `/usr/local/etc/rc.d/telemt`, включая битую символическую ссылку, до записи конфигурации. Уже установленный скрипт нужно обслуживать через его пакет или редактировать явно; автоматической миграции старых скриптов нет. + +Созданный rc.d-скрипт по умолчанию использует PID-файл `/var/run/telemt/telemt.pid` и каталог данных `/var/db/telemt`. Он создаёт отдельный каталог `/var/run/telemt` и выбранный каталог данных с владельцем службы; владелец самого `/var/run` не меняется. Для переопределения в `/etc/rc.conf` доступны `telemt_uid`, `telemt_gid`, `telemt_pidfile` и `telemt_data_dir`. Старые `telemt_user` и `telemt_group` остаются допустимыми псевдонимами. Если группа не задана, используется основная группа выбранной учётной записи. + +Служба запускается с правами для настройки сокетов, после чего Telemt сбрасывает их, если выбран пользователь, отличный от root. SYN limiting вместе со сбросом прав на FreeBSD по-прежнему не поддерживается и отклоняется. Если путь PID-файла переопределён, его родительский каталог уже должен быть доступен учётной записи службы для записи. + ## Дополнительные параметры ### Домен в ссылке вместо IP @@ -285,7 +293,7 @@ root hard nofile 1048576 public_host = "proxy.example.com" ``` -Эта настройка вместе с `public_port` влияет только на native-ссылки. WEB-ссылки `tg://webproxy` всегда используют `[[web.vhosts]].host` и внешний порт `443`. +Эта настройка вместе с `public_port` влияет только на native-ссылки. WEB-ссылки `tg://webproxy` всегда используют конкретное имя хоста и внешний порт `443`. При запуске ссылки выводятся только для явно заданных точных имён из `[[web.vhosts]].host` или `hosts`, но не для wildcard-шаблонов. ### Общий лимит подключений к серверу Этот параметр ограничивает общее количество активных подключений к серверу: