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 Answer 1

3

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

curl --proxy socks5h://localhost:9050
1
  • 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.
    – m3nda
    Commented Aug 9, 2015 at 17:54

You must log in to answer this question.