From 8bcbcd2787bf30126343d6c1414906cc4c8472a5 Mon Sep 17 00:00:00 2001 From: Flowseal Date: Fri, 13 Mar 2026 13:34:22 +0300 Subject: [PATCH] media dc fix on mobiles --- proxy/tg_ws_proxy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy/tg_ws_proxy.py b/proxy/tg_ws_proxy.py index 6f2dd66..6a425b2 100644 --- a/proxy/tg_ws_proxy.py +++ b/proxy/tg_ws_proxy.py @@ -752,9 +752,8 @@ async def _handle_client(reader, writer): # Android (may be ios too) with useSecret=0 has random dc_id bytes — patch it if dc is None and dst in _IP_TO_DC: dc, is_media = _IP_TO_DC.get(dst) - if is_media and dc > 0: dc = -dc if dc in _dc_opt: - init = _patch_init_dc(init, dc) + init = _patch_init_dc(init, dc if is_media else -dc) init_patched = True if dc is None or dc not in _dc_opt: