Merge pull request #599 from Dimasssss/main

Update FAQ
This commit is contained in:
Alexey 2026-03-28 12:28:04 +03:00 committed by GitHub
commit cba837745b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 105 additions and 88 deletions

View File

@ -1,113 +1,122 @@
## How to set up "proxy sponsor" channel and statistics via @MTProxybot bot ## How to set up a "proxy sponsor" channel and statistics via the @MTProxybot
1. Go to @MTProxybot bot. 1. Go to the @MTProxybot.
2. Enter the command `/newproxy` 2. Enter the `/newproxy` command.
3. Send the server IP and port. For example: 1.2.3.4:443 3. Send your server's IP address and port. For example: `1.2.3.4:443`.
4. Open the config `nano /etc/telemt/telemt.toml`. 4. Open the configuration file: `nano /etc/telemt/telemt.toml`.
5. Copy and send the user secret from the [access.users] section to the bot. 5. Copy and send the user secret from the `[access.users]` section to the bot.
6. Copy the tag received from the bot. For example 1234567890abcdef1234567890abcdef. 6. Copy the tag provided by the bot. For example: `1234567890abcdef1234567890abcdef`.
> [!WARNING] > [!WARNING]
> The link provided by the bot will not work. Do not copy or use it! > The link provided by the bot will not work. Do not copy or use it!
7. Uncomment the ad_tag parameter and enter the tag received from the bot. 7. Uncomment the `ad_tag` parameter and enter the tag received from the bot.
8. Uncomment/add the parameter `use_middle_proxy = true`. 8. Uncomment or add the `use_middle_proxy = true` parameter.
Config example: Configuration example:
```toml ```toml
[general] [general]
ad_tag = "1234567890abcdef1234567890abcdef" ad_tag = "1234567890abcdef1234567890abcdef"
use_middle_proxy = true use_middle_proxy = true
``` ```
9. Save the config. Ctrl+S -> Ctrl+X. 9. Save the changes (in nano: Ctrl+S -> Ctrl+X).
10. Restart telemt `systemctl restart telemt`. 10. Restart the telemt service: `systemctl restart telemt`.
11. In the bot, send the command /myproxies and select the added server. 11. Send the `/myproxies` command to the bot and select the added server.
12. Click the "Set promotion" button. 12. Click the "Set promotion" button.
13. Send a **public link** to the channel. Private channels cannot be added! 13. Send a **public link** to the channel. Private channels cannot be added!
14. Wait approximately 1 hour for the information to update on Telegram servers. 14. Wait for about 1 hour for the information to update on Telegram servers.
> [!WARNING] > [!WARNING]
> You will not see the "proxy sponsor" if you are already subscribed to the channel. > The sponsored channel will not be displayed to you if you are already subscribed to it.
**You can also set up different channels for different users.** **You can also configure different sponsored channels for different users:**
```toml ```toml
[access.user_ad_tags] [access.user_ad_tags]
hello = "ad_tag" hello = "ad_tag"
hello2 = "ad_tag2" hello2 = "ad_tag2"
``` ```
## Why is middle proxy (ME) needed ## Why do you need a middle proxy (ME)
https://github.com/telemt/telemt/discussions/167 https://github.com/telemt/telemt/discussions/167
## How many people can use 1 link
By default, 1 link can be used by any number of people. ## How many people can use one link
You can limit the number of IPs using the proxy.
By default, an unlimited number of people can use a single link.
However, you can limit the number of unique IP addresses for each user:
```toml ```toml
[access.user_max_unique_ips] [access.user_max_unique_ips]
hello = 1 hello = 1
``` ```
This parameter limits how many unique IPs can use 1 link simultaneously. If one user disconnects, a second user can connect. Also, multiple users can sit behind the same IP. This parameter sets the maximum number of unique IP addresses from which a single link can be used simultaneously. If the first user disconnects, a second one can connect. At the same time, multiple users can connect from a single IP address simultaneously (for example, devices on the same Wi-Fi network).
## How to create multiple different links ## How to create multiple different links
1. Generate the required number of secrets `openssl rand -hex 16` 1. Generate the required number of secrets using the command: `openssl rand -hex 16`.
2. Open the config `nano /etc/telemt.toml` 2. Open the configuration file: `nano /etc/telemt/telemt.toml`.
3. Add new users. 3. Add new users to the `[access.users]` section:
```toml ```toml
[access.users] [access.users]
user1 = "00000000000000000000000000000001" user1 = "00000000000000000000000000000001"
user2 = "00000000000000000000000000000002" user2 = "00000000000000000000000000000002"
user3 = "00000000000000000000000000000003" user3 = "00000000000000000000000000000003"
``` ```
4. Save the config. Ctrl+S -> Ctrl+X. You don't need to restart telemt. 4. Save the configuration (Ctrl+S -> Ctrl+X). There is no need to restart the telemt service.
5. Get the links via 5. Get the ready-to-use links using the command:
```bash ```bash
curl -s http://127.0.0.1:9091/v1/users | jq curl -s http://127.0.0.1:9091/v1/users | jq
``` ```
## "Unknown TLS SNI" Error ## "Unknown TLS SNI" error
You probably updated tls_domain, but users are still connecting via old links with the previous domain. Usually, this error occurs if you have changed the `tls_domain` parameter, but users continue to connect using old links with the previous domain.
If you need to allow connections with any domains (ignoring SNI mismatches), add the following parameters:
```toml
[censorship]
unknown_sni_action = "mask"
```
## How to view metrics ## How to view metrics
1. Open the config `nano /etc/telemt/telemt.toml` 1. Open the configuration file: `nano /etc/telemt/telemt.toml`.
2. Add the following parameters 2. Add the following parameters:
```toml ```toml
[server] [server]
metrics_port = 9090 metrics_port = 9090
metrics_whitelist = ["127.0.0.1/32", "::1/128", "0.0.0.0/0"] metrics_whitelist = ["127.0.0.1/32", "::1/128", "0.0.0.0/0"]
``` ```
3. Save the config. Ctrl+S -> Ctrl+X. 3. Save the changes (Ctrl+S -> Ctrl+X).
4. Metrics are available at SERVER_IP:9090/metrics. 4. After that, metrics will be available at: `SERVER_IP:9090/metrics`.
> [!WARNING] > [!WARNING]
> "0.0.0.0/0" in metrics_whitelist opens access from any IP. Replace with your own IP. For example "1.2.3.4" > The value `"0.0.0.0/0"` in `metrics_whitelist` opens access to metrics from any IP address. It is recommended to replace it with your personal IP, for example: `"1.2.3.4/32"`.
## Additional parameters ## Additional parameters
### Domain in link instead of IP ### Domain in the link instead of IP
To specify a domain in the links, add to the `[general.links]` section of the config file. To display a domain instead of an IP address in the connection links, add the following lines to the configuration file:
```toml ```toml
[general.links] [general.links]
public_host = "proxy.example.com" public_host = "proxy.example.com"
``` ```
### Server connection limit ### Total server connection limit
Limits the total number of open connections to the server: This parameter limits the total number of active connections to the server:
```toml ```toml
[server] [server]
max_connections = 10000 # 0 - unlimited, 10000 - default max_connections = 10000 # 0 - unlimited, 10000 - default
``` ```
### Upstream Manager ### Upstream Manager
To specify an upstream, add to the `[[upstreams]]` section of the config.toml file: To configure outbound connections (upstreams), add the corresponding parameters to the `[[upstreams]]` section of the configuration file:
#### Binding to IP
#### Binding to an outbound IP address
```toml ```toml
[[upstreams]] [[upstreams]]
type = "direct" type = "direct"
weight = 1 weight = 1
enabled = true enabled = true
interface = "192.168.1.100" # Change to your outgoing IP interface = "192.168.1.100" # Replace with your outbound IP
``` ```
#### SOCKS4/5 as Upstream
- Without authentication: #### Using SOCKS4/5 as an Upstream
- Without authorization:
```toml ```toml
[[upstreams]] [[upstreams]]
type = "socks5" # Specify SOCKS4 or SOCKS5 type = "socks5" # Specify SOCKS4 or SOCKS5
@ -116,7 +125,7 @@ weight = 1 # Set Weight for Scenarios
enabled = true enabled = true
``` ```
- With authentication: - With authorization:
```toml ```toml
[[upstreams]] [[upstreams]]
type = "socks5" # Specify SOCKS4 or SOCKS5 type = "socks5" # Specify SOCKS4 or SOCKS5
@ -127,8 +136,8 @@ weight = 1 # Set Weight for Scenarios
enabled = true enabled = true
``` ```
#### Shadowsocks as Upstream #### Using Shadowsocks as an Upstream
Requires `use_middle_proxy = false`. For this method to work, the `use_middle_proxy = false` parameter must be set.
```toml ```toml
[general] [general]

View File

@ -1,32 +1,32 @@
## Как настроить канал "спонсор прокси" и статистику через бота @MTProxybot ## Как настроить канал "спонсор прокси" и статистику через бота @MTProxybot
1. Зайти в бота @MTProxybot. 1. Зайдите в бота @MTProxybot.
2. Ввести команду `/newproxy` 2. Введите команду `/newproxy`.
3. Отправить IP и порт сервера. Например: 1.2.3.4:443 3. Отправьте IP-адрес и порт сервера. Например: `1.2.3.4:443`.
4. Открыть конфиг `nano /etc/telemt/telemt.toml`. 4. Откройте файл конфигурации: `nano /etc/telemt/telemt.toml`.
5. Скопировать и отправить боту секрет пользователя из раздела [access.users]. 5. Скопируйте и отправьте боту секрет пользователя из раздела `[access.users]`.
6. Скопировать полученный tag у бота. Например 1234567890abcdef1234567890abcdef. 6. Скопируйте тег (tag), который выдаст бот. Например: `1234567890abcdef1234567890abcdef`.
> [!WARNING] > [!WARNING]
> Ссылка, которую выдает бот, не будет работать. Не копируйте и не используйте её! > Ссылка, которую выдает бот, работать не будет. Не копируйте и не используйте её!
7. Раскомментировать параметр ad_tag и вписать tag, полученный у бота. 7. Раскомментируйте параметр `ad_tag` и впишите тег, полученный от бота.
8. Раскомментировать/добавить параметр use_middle_proxy = true. 8. Раскомментируйте или добавьте параметр `use_middle_proxy = true`.
Пример конфига: Пример конфигурации:
```toml ```toml
[general] [general]
ad_tag = "1234567890abcdef1234567890abcdef" ad_tag = "1234567890abcdef1234567890abcdef"
use_middle_proxy = true use_middle_proxy = true
``` ```
9. Сохранить конфиг. Ctrl+S -> Ctrl+X. 9. Сохраните изменения (в nano: Ctrl+S -> Ctrl+X).
10. Перезапустить telemt `systemctl restart telemt`. 10. Перезапустите службу telemt: `systemctl restart telemt`.
11. В боте отправить команду /myproxies и выбрать добавленный сервер. 11. В боте отправьте команду `/myproxies` и выберите добавленный сервер.
12. Нажать кнопку "Set promotion". 12. Нажмите кнопку «Set promotion».
13. Отправить **публичную ссылку** на канал. Приватный канал добавить нельзя! 13. Отправьте **публичную ссылку** на канал. Приватные каналы добавлять нельзя!
14. Подождать примерно 1 час, пока информация обновится на серверах Telegram. 14. Подождите примерно 1 час, пока информация обновится на серверах Telegram.
> [!WARNING] > [!WARNING]
> У вас не будет отображаться "спонсор прокси" если вы уже подписаны на канал. > Спонсорский канал не будет у вас отображаться, если вы уже на него подписаны.
**Также вы можете настроить разные каналы для разных пользователей.** **Вы также можете настроить разные спонсорские каналы для разных пользователей:**
```toml ```toml
[access.user_ad_tags] [access.user_ad_tags]
hello = "ad_tag" hello = "ad_tag"
@ -37,77 +37,85 @@ hello2 = "ad_tag2"
https://github.com/telemt/telemt/discussions/167 https://github.com/telemt/telemt/discussions/167
## Сколько человек может пользоваться 1 ссылкой ## Сколько человек может пользоваться одной ссылкой
По умолчанию 1 ссылкой может пользоваться сколько угодно человек. По умолчанию одной ссылкой может пользоваться неограниченное число людей.
Вы можете ограничить число IP, использующих прокси. Однако вы можете ограничить количество уникальных IP-адресов для каждого пользователя:
```toml ```toml
[access.user_max_unique_ips] [access.user_max_unique_ips]
hello = 1 hello = 1
``` ```
Этот параметр ограничивает, сколько уникальных IP может использовать 1 ссылку одновременно. Если один пользователь отключится, второй сможет подключиться. Также с одного IP может сидеть несколько пользователей. Этот параметр задает максимальное количество уникальных IP-адресов, с которых можно одновременно использовать одну ссылку. Если первый пользователь отключится, второй сможет подключиться. При этом с одного IP-адреса могут подключаться несколько пользователей одновременно (например, устройства в одной Wi-Fi сети).
## Как сделать несколько разных ссылок ## Как создать несколько разных ссылок
1. Сгенерируйте нужное число секретов `openssl rand -hex 16` 1. Сгенерируйте необходимое количество секретов с помощью команды: `openssl rand -hex 16`.
2. Открыть конфиг `nano /etc/telemt.toml` 2. Откройте файл конфигурации: `nano /etc/telemt/telemt.toml`.
3. Добавить новых пользователей. 3. Добавьте новых пользователей в секцию `[access.users]`:
```toml ```toml
[access.users] [access.users]
user1 = "00000000000000000000000000000001" user1 = "00000000000000000000000000000001"
user2 = "00000000000000000000000000000002" user2 = "00000000000000000000000000000002"
user3 = "00000000000000000000000000000003" user3 = "00000000000000000000000000000003"
``` ```
4. Сохранить конфиг. Ctrl+S -> Ctrl+X. Перезапускать telemt не нужно. 4. Сохраните конфигурацию (Ctrl+S -> Ctrl+X). Перезапускать службу telemt не нужно.
5. Получить ссылки через 5. Получите готовые ссылки с помощью команды:
```bash ```bash
curl -s http://127.0.0.1:9091/v1/users | jq curl -s http://127.0.0.1:9091/v1/users | jq
``` ```
## Ошибка "Unknown TLS SNI" ## Ошибка "Unknown TLS SNI"
Возможно, вы обновили tls_domain, но пользователи всё ещё пытаются подключаться по старым ссылкам с прежним доменом. Обычно эта ошибка возникает, если вы изменили параметр `tls_domain`, но пользователи продолжают подключаться по старым ссылкам с прежним доменом.
Если необходимо разрешить подключение с любыми доменами (игнорируя несовпадения SNI), добавьте следующие параметры:
```toml
[censorship]
unknown_sni_action = "mask"
```
## Как посмотреть метрики ## Как посмотреть метрики
1. Открыть конфиг `nano /etc/telemt/telemt.toml` 1. Откройте файл конфигурации: `nano /etc/telemt/telemt.toml`.
2. Добавить следующие параметры 2. Добавьте следующие параметры:
```toml ```toml
[server] [server]
metrics_port = 9090 metrics_port = 9090
metrics_whitelist = ["127.0.0.1/32", "::1/128", "0.0.0.0/0"] metrics_whitelist = ["127.0.0.1/32", "::1/128", "0.0.0.0/0"]
``` ```
3. Сохранить конфиг. Ctrl+S -> Ctrl+X. 3. Сохраните изменения (Ctrl+S -> Ctrl+X).
4. Метрики доступны по адресу SERVER_IP:9090/metrics. 4. После этого метрики будут доступны по адресу: `SERVER_IP:9090/metrics`.
> [!WARNING] > [!WARNING]
> "0.0.0.0/0" в metrics_whitelist открывает доступ с любого IP. Замените на свой ip. Например "1.2.3.4" > Значение `"0.0.0.0/0"` в `metrics_whitelist` открывает доступ к метрикам с любого IP-адреса. Рекомендуется заменить его на ваш личный IP, например: `"1.2.3.4/32"`.
## Дополнительные параметры ## Дополнительные параметры
### Домен в ссылке вместо IP ### Домен в ссылке вместо IP
Чтобы указать домен в ссылках, добавьте в секцию `[general.links]` файла config. Чтобы в ссылках для подключения отображался домен вместо IP-адреса, добавьте следующие строки в файл конфигурации:
```toml ```toml
[general.links] [general.links]
public_host = "proxy.example.com" public_host = "proxy.example.com"
``` ```
### Общий лимит подключений к серверу ### Общий лимит подключений к серверу
Ограничивает общее число открытых подключений к серверу: Этот параметр ограничивает общее количество активных подключений к серверу:
```toml ```toml
[server] [server]
max_connections = 10000 # 0 - unlimited, 10000 - default max_connections = 10000 # 0 - без ограничений, 10000 - по умолчанию
``` ```
### Upstream Manager ### Upstream Manager
Чтобы указать апстрим, добавьте в секцию `[[upstreams]]` файла config.toml: Для настройки исходящих подключений (апстримов) добавьте соответствующие параметры в секцию `[[upstreams]]` файла конфигурации:
#### Привязка к IP
#### Привязка к исходящему IP-адресу
```toml ```toml
[[upstreams]] [[upstreams]]
type = "direct" type = "direct"
weight = 1 weight = 1
enabled = true enabled = true
interface = "192.168.1.100" # Change to your outgoing IP interface = "192.168.1.100" # Замените на ваш исходящий IP
``` ```
#### SOCKS4/5 как Upstream
#### Использование SOCKS4/5 в качестве Upstream
- Без авторизации: - Без авторизации:
```toml ```toml
[[upstreams]] [[upstreams]]
@ -128,8 +136,8 @@ weight = 1 # Set Weight for Scenarios
enabled = true enabled = true
``` ```
#### Shadowsocks как Upstream #### Использование Shadowsocks в качестве Upstream
Требует `use_middle_proxy = false`. Для работы этого метода требуется установить параметр `use_middle_proxy = false`.
```toml ```toml
[general] [general]