From f063d41f83866c7a919e3a5aad294776ece1161d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 16:14:34 +0000 Subject: [PATCH 1/2] Initial plan From aa4a808b2ac62c2ddd7685d77e0494b9f7e33a4f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 16:24:30 +0000 Subject: [PATCH 2/2] Fix uvloop + SOCKS5 incompatibility by disabling uvloop when SOCKS5 is configured Co-authored-by: xrh0905 <29017419+xrh0905@users.noreply.github.com> --- mtprotoproxy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mtprotoproxy.py b/mtprotoproxy.py index e64b189..f03bbfd 100755 --- a/mtprotoproxy.py +++ b/mtprotoproxy.py @@ -2472,6 +2472,11 @@ def reload_signal(signum, frame): def try_setup_uvloop(): + # uvloop is incompatible with SOCKS5 proxy due to socket monkey-patching + if config.SOCKS5_HOST and config.SOCKS5_PORT: + print_err("SOCKS5 proxy is configured, skipping uvloop (incompatible)") + return + try: import uvloop