def enable_proxy(ProxyServer):
proxy_state = proxy_state_menu
#?? AutoConfigURL ???? ProxyServer
if proxy_state.pac:
winreg.DeleteValue(SETTINGS, 'AutoConfigURL')
if not proxy_state.type & 2:
winreg.SetValueEx(SETTINGS, 'ProxyEnable', 0, winreg.REG_DWORD, 1)
proxy_state.type = 2
proxy_state.http = ProxyServer.http
proxy_state.https = ProxyServer.https
winreg.SetValueEx(SETTINGS, 'ProxyServer', 0, winreg.REG_SZ, proxy_state.str)
refresh_proxy_state(1)
评论列表
文章目录