refactor: remove legacy config files (#1294)

This commit is contained in:
Junyan Qin (Chin)
2025-04-13 21:58:36 +08:00
committed by GitHub
parent edc7f81486
commit c8f331675c
29 changed files with 100 additions and 201 deletions

View File

@@ -25,10 +25,10 @@ class ProxyManager:
"https://": os.getenv("HTTPS_PROXY") or os.getenv("https_proxy"),
}
if 'http' in self.ap.system_cfg.data['network-proxies'] and self.ap.system_cfg.data['network-proxies']['http']:
self.forward_proxies['http://'] = self.ap.system_cfg.data['network-proxies']['http']
if 'https' in self.ap.system_cfg.data['network-proxies'] and self.ap.system_cfg.data['network-proxies']['https']:
self.forward_proxies['https://'] = self.ap.system_cfg.data['network-proxies']['https']
if 'http' in self.ap.instance_config.data['proxy'] and self.ap.instance_config.data['proxy']['http']:
self.forward_proxies['http://'] = self.ap.instance_config.data['proxy']['http']
if 'https' in self.ap.instance_config.data['proxy'] and self.ap.instance_config.data['proxy']['https']:
self.forward_proxies['https://'] = self.ap.instance_config.data['proxy']['https']
# 设置到环境变量
os.environ['HTTP_PROXY'] = self.forward_proxies['http://'] or ''