Lines Matching refs:proxies
797 def __init__(self, proxies=None): argument
798 if proxies is None:
799 proxies = getproxies()
800 assert hasattr(proxies, 'keys'), "proxies must be a mapping"
801 self.proxies = proxies
802 for type, url in proxies.items():
1676 def __init__(self, proxies=None, **x509): argument
1680 if proxies is None:
1681 proxies = getproxies()
1682 assert hasattr(proxies, 'keys'), "proxies must be a mapping"
1683 self.proxies = proxies
1739 if urltype in self.proxies:
1740 proxy = self.proxies[urltype]
2235 proxy = self.proxies['http']
2244 self.proxies['http'] = 'http://' + proxyhost + proxyselector
2253 proxy = self.proxies['https']
2262 self.proxies['https'] = 'https://' + proxyhost + proxyselector
2465 proxies = {}
2471 proxies[name[:-6]] = value
2477 proxies.pop('http', None)
2482 proxies[name[:-6]] = value
2484 proxies.pop(name[:-6], None)
2485 return proxies
2487 def proxy_bypass_environment(host, proxies=None): argument
2494 if proxies is None:
2495 proxies = getproxies_environment()
2498 no_proxy = proxies['no']
2606 proxies = getproxies_environment()
2607 if proxies:
2608 return proxy_bypass_environment(host, proxies)
2623 proxies = {}
2628 return proxies
2645 proxies[protocol] = address
2649 proxies['http'] = proxyServer
2651 proxies['http'] = 'http://%s' % proxyServer
2652 proxies['https'] = 'https://%s' % proxyServer
2653 proxies['ftp'] = 'ftp://%s' % proxyServer
2660 return proxies
2728 proxies = getproxies_environment()
2729 if proxies:
2730 return proxy_bypass_environment(host, proxies)