Mtproto and ad tag problem
My mt proto proxy is working just fine but when I add a Ad Tag to it in config file it just stop working in official versian it keeps flickering connecting and connected Im on Ubuntu 22 Using direct ip for proxy Please advise
then ad tag enabled, the proxy uses middle proxy. Please check the server has connectivity to servers specified here: https://core.telegram.org/getProxyConfig
I also updated outdated default address of server in the master branch: https://github.com/alexbers/mtprotoproxy/commit/c89479000fb662c48f0ccc514fdd8112d58d87c7 may be it will help
@alexbers looks like the IPs and ports were changed again. Not only proxies but main IPs too.
I've rechecked, they are still working. The main IP's also the same: https://github.com/telegramdesktop/tdesktop/blob/master/Telegram/SourceFiles/mtproto/mtproto_dc_options.cpp#L32
@alexbers you're right. I've checked another source, the pyrogram lib's docs. Btw, there's no middle proxies with 80 port open anymore in the list by the link you've given above. All the proxies are on 8888.
fixed, thanks.
https://github.com/alexbers/mtprotoproxy/commit/bc841cff482a72472f15a36f86ca01aa11cac58b
Got same problem. I've installed two same copies of proxies on different VPS, first one is working well, but second only works when AD_TAG is empty.
TG_MIDDLE_PROXIES_V4 = { 1: [("149.154.175.50", 8888)], -1: [("149.154.175.50", 8888)], 2: [("149.154.161.144", 80)], -2: [("149.154.161.144", 8888)], 3: [("149.154.175.100", 8888)], -3: [("149.154.175.100", 8888)], 4: [("91.108.4.138", 8888)], -4: [("149.154.165.109", 8888)], 5: [("91.108.56.135", 8888)], -5: [("91.108.56.135", 8888)], }
I use domain names (FQDN) to do round-robin DNS load balancing of multiple proxies with a single domain name.
Everything works, until I enable the AD_TAG.
I've read somewhere that the proxy submits the detected machine IP address to Telegram servers with AD_TAG. Would it be possible to submit a custom domain instead of the detected IP (like in config.py)? Will that make AD_TAG work for high-availability round-robin setups?
6-2025 this still happen to me (try different VPSs)
When AD_TAG is enabled, the program tries to connect to Telegram servers via IPv6 — and that's where the problem lies. You need to either disable IPv6 on the host or at the container level.
Update your docker-compose.yml as follows:
🛠 Updated docker-compose.yml
services:
mtprotoproxy:
...
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
ports:
- "443:443"
And enjoy a working proxy without IPv6 issues!
P.S. Don't forget to update TG_MIDDLE_PROXIES_V4 in the mtprotoproxy.py file with the latest middle proxy IP addresses from Telegram.
I tried everything, but when AD_TAG is not empty, it don't work anymore any solution?
I tried everything, but when AD_TAG is not empty, it don't work anymore any solution?
use original mtproto from telegram, it's most stable