【发布时间】:2014-03-31 08:01:21
【问题描述】:
有没有办法使用系统的默认代理来设置带有httplib(2)的httptunnel(无需提供信息和凭据)?
我查看了urllib2.ProxyHandler,这似乎可以满足我的所有需求。但如果我在谷歌上搜索 httplib 替代方案,我总是必须提供服务器和端口。
class urllib2.ProxyHandler([proxies])
Cause requests to go through a proxy. If proxies is given, it must be a dictionary mapping protocol names to URLs of proxies.
The default is to read the list of proxies from the environment variables <protocol>_proxy.
If no proxy environment variables are set, then in a Windows environment proxy settings are obtained from the registry’s Internet Settings section, and in a Mac OS X environment proxy information is retrieved from the OS X System Configuration Framework.
To disable autodetected proxy pass an empty dictionary.`
【问题讨论】:
标签: python proxy tunnel httplib