mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 15:26:03 +00:00
refactor: remove legacy config files (#1294)
This commit is contained in:
committed by
GitHub
parent
edc7f81486
commit
c8f331675c
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user