首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tor-privoxy错误:连接被拒绝

tor-privoxy错误:连接被拒绝
EN

Stack Overflow用户
提问于 2015-08-11 08:31:16
回答 1查看 809关注 0票数 1

我正在尝试使用tor-privoxy来切换我的IP地址。

我从自述文件中复制了大部分代码:

代码语言:javascript
复制
require 'tor-privoxy'

agent ||= TorPrivoxy::Agent.new '127.0.0.1', '', {8123 => 9051} do |agent|
  sleep 5
  p agent
  p "New IP is #{agent.ip}"
end

但是当我运行它的时候,我得到了这个错误:

代码语言:javascript
复制
C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:641:in `rescue in connection_for': connection refused: 127.0.0.1:8123 (Net::HTTP::Persistent::Error)
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:589:in `connection_for'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.9.4/lib/net/http/persistent.rb:994:in `request'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mechanize-2.7.3/lib/mechanize/http/agent.rb:259:in `fetch'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mechanize-2.7.3/lib/mechanize.rb:440:in `get'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:38:in `ip'
    from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:6:in `block in <main>'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:11:in `call'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/tor-privoxy-0.1.1/lib/tor-privoxy/agent.rb:11:in `initialize'
    from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:3:in `new'
    from C:/Users/Lap/Dropbox/Programming_Stuff/Ruby_Stuff/Code/tor and socksify stuff/torPrivoxyTest.rb:3:in `<main>'
[Finished in 8.5s with exit code 1]

我做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2015-08-11 21:55:14

您似乎使用了错误的端口。Privoxy使用端口8118 (8123是polipo)。另一方面,Tor使用9050 (普通的Tor)或9150 (Tor浏览器捆绑包)。因此,如果您更改您的设置,通信应该可以工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31931314

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档