Skip to content

Commit

Permalink
fix bug: if proxy is set but not gae, tray show GAE
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Dec 24, 2015
1 parent 70234d3 commit 37e472c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions launcher/win_tray.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,24 @@ def get_proxy_state(self):
try:
AutoConfigURL, reg_type = winreg.QueryValueEx(INTERNET_SETTINGS, 'AutoConfigURL')
if AutoConfigURL:
return "pac"
if AutoConfigURL == "http://127.0.0.1:8086/proxy.pac":
return "pac"
else:
return "unknown"
except Exception as e:
pass

try:
ProxyEnable, reg_type = winreg.QueryValueEx(INTERNET_SETTINGS, 'ProxyEnable')
if ProxyEnable:
return "gae"
ProxyServer, reg_type = winreg.QueryValueEx(INTERNET_SETTINGS, 'ProxyServer')
if ProxyServer == "127.0.0.1:8087":
return "gae"
else:
return "unknown"
except Exception as e:
pass

return "disable"

def on_right_click(self):
Expand Down

0 comments on commit 37e472c

Please sign in to comment.