mirror of
https://github.com/telemt/telemt.git
synced 2026-10-31 12:52:19 +03:00
FreeBSD Daemon Init in FAQ
This commit is contained in:
+9
-1
@@ -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
|
## Additional parameters
|
||||||
|
|
||||||
### Domain in the link instead of IP
|
### 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"
|
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
|
### Total server connection limit
|
||||||
This parameter limits the total number of active connections to the server:
|
This parameter limits the total number of active connections to the server:
|
||||||
|
|||||||
+9
-1
@@ -276,6 +276,14 @@ root soft nofile 1048576
|
|||||||
root hard 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
|
### Домен в ссылке вместо IP
|
||||||
@@ -285,7 +293,7 @@ root hard nofile 1048576
|
|||||||
public_host = "proxy.example.com"
|
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-шаблонов.
|
||||||
|
|
||||||
### Общий лимит подключений к серверу
|
### Общий лимит подключений к серверу
|
||||||
Этот параметр ограничивает общее количество активных подключений к серверу:
|
Этот параметр ограничивает общее количество активных подключений к серверу:
|
||||||
|
|||||||
Reference in New Issue
Block a user