From 14a20eac26ea035c2d379b168ab7fa23291a260b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=92=D0=B5=D1=89=D0=B5?= =?UTF-8?q?=D0=B2?= Date: Mon, 16 Mar 2026 02:24:14 +0300 Subject: [PATCH] Media chunk size fix --- proxy/tg_ws_proxy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxy/tg_ws_proxy.py b/proxy/tg_ws_proxy.py index 227a24a..6573934 100644 --- a/proxy/tg_ws_proxy.py +++ b/proxy/tg_ws_proxy.py @@ -18,8 +18,8 @@ DEFAULT_PORT = 1080 log = logging.getLogger('tg-ws-proxy') _TCP_NODELAY = True -_RECV_BUF = 131072 -_SEND_BUF = 131072 +_RECV_BUF = 65536 +_SEND_BUF = 65536 _WS_POOL_SIZE = 4 _WS_POOL_MAX_AGE = 120.0 @@ -614,7 +614,7 @@ async def _bridge_ws(reader, writer, ws: RawWebSocket, label, nonlocal up_bytes, up_packets try: while True: - chunk = await reader.read(131072) + chunk = await reader.read(65536) if not chunk: break _stats.bytes_up += len(chunk)