Created
March 26, 2013 05:31
-
-
Save socrateslee/5243365 to your computer and use it in GitHub Desktop.
Set remote dns for httplib2 proxy.
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
import httplib2 | |
# set proxy_rdns=True to ensure use the dns on | |
# remote proxy, in case local DNS is pulluted. | |
proxy = httplib2.ProxyInfo(httplib2.socks.PROXY_TYPE_HTTP, | |
'localhost', 8000, | |
proxy_rdns=True) | |
http = httplib2.Http(proxy_info=proxy) | |
http.request('http://google.com') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment