From 7fc24fea9574829c6c3f86be2ae0c5437f581c9f Mon Sep 17 00:00:00 2001 From: Flowseal Date: Fri, 26 Jun 2026 18:59:37 +0300 Subject: [PATCH] todos --- proxy/tg_ws_proxy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxy/tg_ws_proxy.py b/proxy/tg_ws_proxy.py index 3b5825c..e6e5d66 100644 --- a/proxy/tg_ws_proxy.py +++ b/proxy/tg_ws_proxy.py @@ -335,6 +335,7 @@ async def _handle_client(reader, writer, secret: bytes): log.info("[%s] DC%d%s -> pool hit via %s", label, dc, media_tag, target) elif fronting_active: + # TODO: Move fronting logic into bridge.py where other fallbacks are handled log.info("[%s] DC%d%s -> fronting / Host %s", label, dc, media_tag, domains[0]) try: @@ -387,6 +388,8 @@ async def _handle_client(reader, writer, secret: bytes): label, dc, media_tag, repr(exc)) # Fronting fallback if WS timed out + # TODO: Move fronting logic into bridge.py where other fallbacks are handled + # and don't forget about WsPool fronting fallback if ws is None and ws_timed_out and not fronting_active: log.info("[%s] DC%d%s -> fronting fallback (Host %s)", label, dc, media_tag, domains[0]) @@ -415,6 +418,8 @@ async def _handle_client(reader, writer, secret: bytes): dc_fail_until[dc_key] = now + DC_FAIL_COOLDOWN else: dc_fail_until[dc_key] = now + DC_FAIL_COOLDOWN + # TODO: may be don't try regular WS connection and do fallback instanstly + # instead of waiting for WS_FAIL_TIMEOUT and then fallback log.info("[%s] DC%d%s WS cooldown for %ds", label, dc, media_tag, int(DC_FAIL_COOLDOWN))