Commit 2efe385f authored by Joshua Roesslein's avatar Joshua Roesslein Committed by GitHub

Merge pull request #1033 from Autumn945/master

proxies support
parents 7e4b120a d18b1478
......@@ -220,6 +220,9 @@ class Stream(object):
self.body = None
self.retry_time = self.retry_time_start
self.snooze_time = self.snooze_time_step
# Example: proxies = {'http': 'http://localhost:1080', 'https': 'http://localhost:1080'}
self.proxies = options.get("proxies")
def new_session(self):
self.session = requests.Session()
......@@ -247,7 +250,8 @@ class Stream(object):
timeout=self.timeout,
stream=True,
auth=auth,
verify=self.verify)
verify=self.verify,
proxies = self.proxies)
if resp.status_code != 200:
if self.listener.on_error(resp.status_code) is False:
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment