From 368669a546ddf255c117238134b0abcf99c9e3f4 Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Wed, 18 Feb 2026 02:10:55 +0500 Subject: [PATCH] don't prefer ipv6 if using middle proxies, they are unstable --- mtprotoproxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index 2565b72..9fb58bf 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -139,8 +139,8 @@ def init_config(): # use middle proxy, necessary to show ad conf_dict.setdefault("USE_MIDDLE_PROXY", len(conf_dict["AD_TAG"]) == 16) - # if IPv6 available, use it by default - conf_dict.setdefault("PREFER_IPV6", socket.has_ipv6) + # if IPv6 available, use it by default, IPv6 with middle proxies is unstable now + conf_dict.setdefault("PREFER_IPV6", socket.has_ipv6 and not conf_dict["USE_MIDDLE_PROXY"]) # disables tg->client traffic reencryption, faster but less secure conf_dict.setdefault("FAST_MODE", True)