如何在cURL中使用Tor(在Windows中)?

Vol*_*Rig 5 windows curl tor

我安装了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
Run Code Online (Sandbox Code Playgroud)

解决了:

curl -v --socks4a localhost:9050 http://check.torproject.org/
Run Code Online (Sandbox Code Playgroud)

Mar*_*c B 6

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