3

I am trying to use torsocks with curl. Tor is running as a relay node. DNS lookup is working but connection to the target with HTTP fails.

$ host www.ipmango.com
www.ipmango.com has address 173.255.230.5

$ torsocks curl -v http://www.ipmango.com/api/myip
* About to connect() to www.ipmango.com port 80 (#0)
*   Trying 173.255.230.5... Timeout
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

My /etc/tor/tor-tsocks.conf:

server = 127.0.0.1
server_port = 9050    
local = 127.0.0.0/255.128.0.0
local = 127.128.0.0/255.192.0.0

The relevant part of /etc/tor/torrc:

ControlPort 9052
ORPort auto
SocksPort 9050

Versions:

$ tor --version
Tor version 0.2.4.20 (git-0d50b03673670de6).

What configuration is wrong?

1 Answers1

3

Why the need to use tsocks? curl does support socks proxy

curl --proxy socks5h://localhost:9050
guest
  • 41
  • 2