title: Doing https requests through a SOCKS5 proxy (tor) with curl
body: <p>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.</p>
  
  <p>just https works:
  <code>curl https://www.reg.ru/whois/?dname=google.com</code></p>
  
  <p>Tor + http work
  <code>curl --socks5 127.0.0.1:9050 http://stackoverflow.com/</code></p>
  
  <p><strong>but tor with https does not work:</strong></p>
  
  <p><code>curl --socks5 127.0.0.1:9050 https://www.torproject.org/download/download.html.en</code></p>
  
  <p>I get an error <code>curl: (6) Failed to resolve "www.torproject.org" for SOCKS5 connect.</code></p>
  
  <p>How can I solve this?</p>