How to use Tor with cURL (on Windows)?

I have Vidalia installed, configure Chrome to use port 8118 for the proxy server, and I checked my connection through https://check.torproject.org/ , but I am having difficulty getting this to work with the cURL command-line tool. Here is what I am trying:

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 

solvable

 curl -v --socks4a localhost:9050 http://check.torproject.org/ 
+5
source share
3 answers

Use --socks5 (two dashes). -socks5 not a valid parameter for curl, so curl interprets it as the host name.

+3
source

Turns out this whole mess is just syntax issues. The correct command is here:

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

With two dashes in front of socks4a and ONE socks in front of the port.

+2
source

More recent answer with socks5 .

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

So using port 9150 for socks 5.

+1
source

Source: https://habr.com/ru/post/950536/


All Articles