使用Tor作为代理 [英] using Tor as Proxy

查看:272
本文介绍了使用Tor作为代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Tor-Server作为的HttpWebRequest 的代理,我的code是这样的:

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()与状态= ServerProtocolViolation。该消息是(德文...):消息=明镜服务器的帽子EINE Protokollverletzungausgeführt..款= ResponseStatusLine

推荐答案

如果您有 Privoxy的安装并运行你可以做

If you have privoxy installed and running you can do

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

这将使你做出使用Tor请求

Which will enable you to make requests using tor

这篇关于使用Tor作为代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆