SKulibin
SKulibin

Reputation: 749

Doing https requests through a SOCKS5 proxy (tor) with curl

I have TOR setup on my system (debian) that has been tested and works well. What I am trying to do is proxy HTTPS requests through this setup.

just https works: curl https://www.reg.ru/whois/?dname=google.com

Tor + http work curl --socks5 127.0.0.1:9050 http://stackoverflow.com/

but tor with https does not work:

curl --socks5 127.0.0.1:9050 https://www.torproject.org/download/download.html.en

I get an error curl: (6) Failed to resolve "www.torproject.org" for SOCKS5 connect.

How can I solve this?

Upvotes: 45

Views: 67043

Answers (1)

Andris
Andris

Reputation: 5370

I had a similar problem, and using the option --socks5-hostname instead of --socks5 to specify the proxy for curl solved the issue.

Upvotes: 59

Related Questions