【问题标题】:How do I use Tor with cURL (in Windows)?如何将 Tor 与 cURL 一起使用(在 Windows 中)?
【发布时间】:2011-08-23 20:30:11
【问题描述】:

我安装了 Vidalia,将 Chrome 设置为使用端口 8118 作为代理,我已经通过 https://check.torproject.org/ 检查了我的连接,但我在使用命令行工具 cURL 进行这项工作时遇到了困难。这是我尝试的:

C:\>curl -v --proxy localhost::9050 http://google.com
* About to connect() to proxy localhost port 0 (#0)
* Failed to connect to ↕: Address not available
* No error
*   Trying 127.0.0.1... Failed to connect to 127.0.0.1: Address not available
* No error
* couldn't connect to host
* Closing connection #0
curl: (7) Failed to connect to ↕: Address not available

已解决

curl -v --socks4a localhost:9050 http://check.torproject.org/

【问题讨论】:

    标签: windows curl tor


    【解决方案1】:

    使用--socks5(两个破折号)。 -socks5 不是 curl 的有效参数,因此 curl 将其解释为主机名。

    【讨论】:

    • 刚刚注意到并更改了它,现在它显示新的错误,无法连接。
    • 是一个奇怪的主机名...发生了一些奇怪的事情。
    • 是的,事实上我在端口前有 2 个冒号而不是 1 个。
    【解决方案2】:

    原来这整个混乱只是语法问题。正确的命令在这里:

    curl -v --socks4a localhost:9050 http://check.torproject.org/
    

    socks4a 前有两个破折号,端口前有一个冒号。

    【讨论】:

      【解决方案3】:

      更多更新回复使用socks5

      curl -v --socks5 localhost:9150 http://check.torproject.org/
      

      所以,使用port 9150 来制作袜子 5。

      【讨论】:

        猜你喜欢
        • 2014-12-16
        • 2019-08-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-12-04
        • 2014-01-06
        • 2013-08-12
        • 2011-04-01
        相关资源
        最近更新 更多