mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 02:15:22 +00:00
Merge pull request #328 from c13/master
check enviroment for https_proxy
This commit is contained in:
commit
b75eb8a9fe
@ -19,6 +19,11 @@ class OverloadClient(object):
|
||||
self.session = requests.Session()
|
||||
self.session.verify = False
|
||||
self.session.headers.update({"User-Agent": "tank"})
|
||||
if "https" in requests.utils.getproxies():
|
||||
logger.info("Connecting via proxy %s" % requests.utils.getproxies()['https'])
|
||||
self.session.proxies = requests.utils.getproxies()
|
||||
else:
|
||||
logger.info("Proxy not set")
|
||||
|
||||
def set_api_address(self, addr):
|
||||
self.address = addr
|
||||
|
Loading…
Reference in New Issue
Block a user