From 13f61d2fc04522f396e4a9f6980e8df4ef2fb151 Mon Sep 17 00:00:00 2001 From: jimi <1847930177@qq.com> Date: Sun, 1 Mar 2026 17:41:11 +0800 Subject: [PATCH] fix: disable env proxy by default for Tianwang callback requests --- core/websocket_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/websocket_client.py b/core/websocket_client.py index 7cc5d09..e9ce953 100755 --- a/core/websocket_client.py +++ b/core/websocket_client.py @@ -214,6 +214,7 @@ class QingjianAPIClient: try: import httpx + trust_env = os.getenv("TIANWANG_CALLBACK_TRUST_ENV", "false").lower() in ("1", "true", "yes") payload = { "event": event, "timestamp": datetime.now().isoformat(), @@ -229,7 +230,7 @@ class QingjianAPIClient: } if extra: payload.update(extra) - async with httpx.AsyncClient(timeout=6) as client: + async with httpx.AsyncClient(timeout=6, trust_env=trust_env) as client: resp = await client.post(self._tianwang_callback_url, json=payload) ok = 200 <= resp.status_code < 300 self._activity_log(