Skip to content

Commit

Permalink
make requests to ignore environment's proxies variable so that when c…
Browse files Browse the repository at this point in the history
…hanging to non-proxy network, you don't have to restart your computer.
  • Loading branch information
Dragon2fly committed May 18, 2016
1 parent 9456858 commit e31fa05
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vpnproxy_tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = "duc_tin"
__copyright__ = "Copyright 2015+, duc_tin"
__license__ = "GPLv2"
__version__ = "1.25"
__version__ = "1.27"
__maintainer__ = "duc_tin"
__email__ = "[email protected]"

Expand Down Expand Up @@ -184,6 +184,7 @@ def first_config(self):

def get_csv(self, url, queue, proxy={}):
self.messages['debug'].appendleft(' using gate: ' + url)
# self.messages['debug'].appendleft(str(proxy))
try:
gate = url + '/api/iphone/'
vpn_data = requests.get(gate, proxies=proxy, timeout=3).text.replace('\r', '')
Expand Down Expand Up @@ -229,12 +230,12 @@ def get_data(self):
self.ip = socket.gethostbyname(self.proxy)

proxies = {
'http': 'http://' + self.proxy + ':' + self.port,
'https': 'http://' + self.proxy + ':' + self.port,
'http': 'http://' + self.ip + ':' + self.port,
'https': 'https://' + self.ip + ':' + self.port,
}

else:
proxies = {}
proxies = {'no': 'pass',}

my_queue = Queue()
my_thread = []
Expand Down

0 comments on commit e31fa05

Please sign in to comment.