1

I've set up polipo to work with Tor. When I configure the iceweasel browser to use the HTTP proxy at localhost:8118, everything works fine, and my global IP appears as some IP from some university (which indicates Tor is working through polipo). I'm trying to do the same thing but on python, like this:

conn = http.client.HTTPConnection("localhost",8118)
conn.set_tunnel("server.com", 80)

Which is the code necessary to set up a proxy HTTP request. (don't ask me why set_tunnel is not for setting the proxy, it's written this way in the python docs). Well, the code alone without the tunnel works, but with the tunnel I get some strange error messages. In order to try to discover what was happening, I made a connection to my computer, and captured the HTTP request being sent by polipo + Tor to my computer, and got this:

POST /tags/demo_form_method.asp HTTP/1.1
Host: localhost:8118
Accept-Encoding: identity
Content-Length: 40
Content-type: application/x-www-form-urlencoded
Accept: text/plain

Nome=abcde&Telefone=24324

As you can see, the

Host: localhost:8118 line is specifying the server to respond to "localhost:8118" when in fact it should be the IP of the sender (which is my raspberry pi, that is connected miles away from here). So, something is going wrong and I don't know what's happening. When I analyze the packets from the iceweasel to my computer, everything's great, the Host is working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.