- Go to @MTProxybot bot.
- Enter the command
/newproxy - Send the server IP and port. For example: 1.2.3.4:443
- Open the config
nano /etc/telemt.toml. - Copy and send the user secret from the [access.users] section to the bot.
- Copy the tag received from the bot. For example 1234567890abcdef1234567890abcdef.
Warning
The link provided by the bot will not work. Do not copy or use it!
- Uncomment the ad_tag parameter and enter the tag received from the bot.
- Uncomment/add the parameter
use_middle_proxy = true.
Config example:
[general]
ad_tag = "1234567890abcdef1234567890abcdef"
use_middle_proxy = true- Save the config. Ctrl+S -> Ctrl+X.
- Restart telemt
systemctl restart telemt. - In the bot, send the command /myproxies and select the added server.
- Click the "Set promotion" button.
- Send a public link to the channel. Private channels cannot be added!
- Wait approximately 1 hour for the information to update on Telegram servers.
Warning
You will not see the "proxy sponsor" if you are already subscribed to the channel.
You can also set up different channels for different users.
[access.user_ad_tags]
hello = "ad_tag"
hello2 = "ad_tag2"By default, 1 link can be used by any number of people.
You can limit the number of IPs using the proxy.
[access.user_max_unique_ips]
hello = 1This 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.
- Generate the required number of secrets
openssl rand -hex 16 - Open the config
nano /etc/telemt.toml - Add new users.
[access.users]
user1 = "00000000000000000000000000000001"
user2 = "00000000000000000000000000000002"
user3 = "00000000000000000000000000000003"- Save the config. Ctrl+S -> Ctrl+X. You don't need to restart telemt.
- Get the links via
journalctl -u telemt -n -g "links" --no-pager -o cat | tac
- Open the config
nano /etc/telemt.toml - Add the following parameters
[server]
metrics_port = 9090
metrics_whitelist = ["127.0.0.1/32", "::1/128", "0.0.0.0/0"]- Save the config. Ctrl+S -> Ctrl+X.
- Metrics are available at SERVER_IP:9090/metrics.
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"
To specify a domain in the links, add to the [general.links] section of the config file.
[general.links]
public_host = "proxy.example.com"To specify an upstream, add to the [[upstreams]] section of the config.toml file:
[[upstreams]]
type = "direct"
weight = 1
enabled = true
interface = "192.168.1.100" # Change to your outgoing IP- Without authentication:
[[upstreams]]
type = "socks5" # Specify SOCKS4 or SOCKS5
address = "1.2.3.4:1234" # SOCKS-server Address
weight = 1 # Set Weight for Scenarios
enabled = true- With authentication:
[[upstreams]]
type = "socks5" # Specify SOCKS4 or SOCKS5
address = "1.2.3.4:1234" # SOCKS-server Address
username = "user" # Username for Auth on SOCKS-server
password = "pass" # Password for Auth on SOCKS-server
weight = 1 # Set Weight for Scenarios
enabled = true