curl-and-python

Resolve DNS via Proxy

From: Giacomo <lib.giacomo_at_gmail.com>
Date: Thu, 15 Nov 2012 12:19:38 +1100

Hi there,

I'm pretty sure this topic has been talked about before but I can't find anything related to my question. So that is why I turn to you all.
I'm working on a project where I want the possibility for traffic to go trough the Tor network. Sending my HTTP traffic through the proxy goes fine, but all my DNS requests are being bypassed. Now this is possibly expected behaviour, but I was wondering if PyCurl offers the possibility to also send DNS requests through the defined proxy.
The current lines I use to define my proxy are:

        curl.setopt(curl.PROXY, "127.0.0.1:9050")
        curl.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5)
        
Cheers.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2012-11-15