Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Tor as Proxy

I'm trying to use Tor-Server as a proxy in HttpWebRequest, my code looks like this:

HttpWebRequest request; HttpWebResponse response;  request = (HttpWebRequest)WebRequest.Create("http://www.google.com"); request.Proxy = new WebProxy("127.0.0.1:9051");  response = (HttpWebResponse)request.GetResponse(); response.Close(); 

it works perfect with "normal" proxies but with Tor I'm getting Exceptions while calling

GetResponse() with Status = ServerProtocolViolation. The message is (in German...):Message = "Der Server hat eine Protokollverletzung ausgeführt.. Section=ResponseStatusLine"

like image 438
Lay Avatar asked Dec 26 '09 02:12

Lay


People also ask

Can Tor be used as a proxy?

Tor is a free-to-use network of access points called nodes that work like proxies for your connection. It's also the name of the browser you use to connect to this network. When you use the Tor browser, your connection gets routed through several of these nodes before arriving at its end destination.

Can you be traced while using Tor?

Can Tor be traced? It's difficult, but it is possible. To ensure your safety, you should take additional precautions (like using a VPN) while browsing with Tor. Some of Tor's nodes have been compromised in the past and used to expose users and even intercept their traffic.

How do I use Chrome proxy Tor?

Using the Tools menus (it looks like a wrench), choose options, "Under the hood". Scroll down to "Network" and click the "Change Proxy Setting" button. Under the "Connections" tab, choose "LAN Setting" - Select Use Proxy server and enter "Localhost" and port 8118. Save your work and return to the Chrome web browser.


2 Answers

If you have privoxy installed and running you can do

request.Proxy = new WebProxy("127.0.0.1:8118"); // default privoxy port 

Which will enable you to make requests using tor

like image 170
Christopher Tarquini Avatar answered Oct 05 '22 14:10

Christopher Tarquini


Tor is not an HTTP proxy. It's a SOCKS proxy. You can use an HTTP proxy that supports forwarding on SOCKS (like Privoxy) and connect to that via code instead.

like image 31
mmx Avatar answered Oct 05 '22 15:10

mmx