-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make requests to ignore environment's proxies variable so that when c…
…hanging to non-proxy network, you don't have to restart your computer.
- Loading branch information
1 parent
9456858
commit e31fa05
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]" | ||
|
||
|
@@ -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', '') | ||
|
@@ -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 = [] | ||
|