From 7c19785a17a0c57c37429111a551951bc2586711 Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Tue, 12 Nov 2024 17:56:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20http=5Fproxy=20=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=BA=E7=A9=BA=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/utils/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/utils/proxy.py b/pkg/utils/proxy.py index 06d1a9c4..db03ad93 100644 --- a/pkg/utils/proxy.py +++ b/pkg/utils/proxy.py @@ -31,8 +31,8 @@ class ProxyManager: self.forward_proxies['https://'] = self.ap.system_cfg.data['network-proxies']['https'] # 设置到环境变量 - os.environ['HTTP_PROXY'] = self.forward_proxies['http://'] - os.environ['HTTPS_PROXY'] = self.forward_proxies['https://'] + os.environ['HTTP_PROXY'] = self.forward_proxies['http://'] or '' + os.environ['HTTPS_PROXY'] = self.forward_proxies['https://'] or '' def get_forward_proxies(self) -> dict: return self.forward_proxies.copy()