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

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

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

server =
server_port = 9050    
local =
local =

The relevant part of /etc/tor/torrc:

ControlPort 9052
ORPort auto
SocksPort 9050


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

What configuration is wrong?


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

curl --proxy socks5h://localhost:9050
  • The need to use tsocks is surely a intent to bypass ALL to tor software. The main idea is to use one solution instead of learn and use each proxy option in each program do you tend to use. Of course, if you only need to bypass curl, built-in --proxy flag it's the right one. – erm3nda Aug 9 '15 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy