From d972f6e5fe0cbbda2013b0b9f61a00525d2b9f24 Mon Sep 17 00:00:00 2001 From: YangCheng <1633794139@qq.com> Date: Fri, 20 Mar 2026 22:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=89=80=E6=9C=89HT?= =?UTF-8?q?TP=E8=AF=B7=E6=B1=82=E7=A6=81=E7=94=A8=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BB=A3=E7=90=86=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=9C=AC=E6=9C=BA?= =?UTF-8?q?Clash=E4=BB=A3=E7=90=86=E5=AF=BC=E8=87=B4=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E5=92=8C=E5=91=8A=E8=AD=A6=E4=B8=8A=E6=8A=A5=E8=B6=85=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/alarm_upload_worker.py | 6 ++++-- main.py | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/alarm_upload_worker.py b/core/alarm_upload_worker.py index c473a96..0af1bd6 100644 --- a/core/alarm_upload_worker.py +++ b/core/alarm_upload_worker.py @@ -107,7 +107,7 @@ class AlarmUploadWorker: self._logger.info(f"告警上报端点: {report_url}") try: - resp = requests.get(health_url, timeout=5) + resp = requests.get(health_url, timeout=5, proxies={"http": None, "https": None}) if resp.status_code == 200: self._logger.info(f"云端健康检查通过: {health_url}") else: @@ -247,7 +247,8 @@ class AlarmUploadWorker: } try: - response = requests.post(url, json=payload, headers=headers, timeout=10) + response = requests.post(url, json=payload, headers=headers, timeout=10, + proxies={"http": None, "https": None}) if response.status_code == 200: body = response.json() if body.get("code") == 0: @@ -346,6 +347,7 @@ class AlarmUploadWorker: json=report_data, headers=headers, timeout=10, + proxies={"http": None, "https": None}, ) if response.status_code == 200: diff --git a/main.py b/main.py index 0671685..c4dd923 100644 --- a/main.py +++ b/main.py @@ -323,7 +323,8 @@ class EdgeInferenceService: for url in urls: try: - resp = requests.post(url, json=payload, timeout=10) + resp = requests.post(url, json=payload, timeout=10, + proxies={"http": None, "https": None}) if resp.status_code == 200: self._logger.debug(f"[心跳] {url} 上报成功") else: