我安装了 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/
最佳答案
使用 --socks5
(两个破折号)。 -socks5
不是 curl 的有效参数,因此 curl 将其解释为主机名。
关于windows - 如何将 Tor 与 cURL 结合使用(在 Windows 中)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7167166/