Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
394 views
in Technique[技术] by (71.8m points)

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?

question from:https://stackoverflow.com/questions/24568788/doing-https-requests-through-a-socks5-proxy-tor-with-curl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...