开发者

How do I use Tor with cURL (in Windows)?

I have Vidalia installed, set up Chrome to use port 8118 for the proxy and I've checked my connection through https://check.torproject.org/ but I'm having difficulties getting this work with the command-line tool cURL. This is what I try:

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 t开发者_如何转开发o 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

Solved:

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


Use --socks5 (two dashes). -socks5 is not a valid parameter for curl, so curl is interpreting it as a hostname.


Turns out this entire mess was just syntax problems. A proper command is here:

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

With TWO dashes before socks4a and ONE colon before the port.


More updated response using socks5.

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

So, using port 9150 for socks 5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜