Environment: macOs + iTerm(has be set https_proxy and http_proxy) + shadowsocks(in auto mode)

why curl -k https://www.google.com (not http) has no effect, while https://www.google.com is ok in google chrome location?

curl -i http://www.google.com

HTTP/1.1 200 OK
Date: Wed, 13 Feb 2019 09:02:54 GMT

curl -k https://www.google.com

curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number

closed as unclear what you're asking by DarkHeart, Mr Shunz, Rui F Ribeiro, Christopher, Kusalananda Feb 14 at 20:31

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • My understanding of the question: User is able to access the google home page over HTTP but not HTTPS. If that is the case, please respond here, and I'll update your question accordingly. – darnir Feb 14 at 12:43
  • 1. I can access the google home page with Chrome Browser. 2. I can access the google home page over http with curl. 3. I can not access the google home page over https with curl. – liuxiaoyong Feb 19 at 2:45

If my understanding of your question if right, you're facing troubles accessing the Google home page over HTTPS.

Based on the error message you provided, the first thought goes towards you using an old version of OpenSSL which supports only upto SSLv3 or TLSv1, both of which are now deprecated protocols. Try using a newer version of curl and see if it still persists

  • curl-config --version libcurl 7.54.0 – liuxiaoyong Feb 19 at 2:51
  • Then I have install the curl via brew, it's version 7.64.0. The try outputs is here /usr/local/Cellar/curl/7.64.0/bin/curl -k https://www.google.com curl: (4) Unsupported proxy '', libcurl is built without the HTTPS-proxy support. – liuxiaoyong Feb 19 at 2:57
  • Yep. I have used https_proxy with shadowsocks in auto mode. – liuxiaoyong Feb 19 at 3:05
  • Please add this information to the main question. Also, the solution is right there, you need to rebuild curl with proxy support – darnir Feb 19 at 12:40
  • Yes. I have add. But the main question error is CONNECT_CR_SRVR_HELLO. So not necessarily "curl is not support https proxy" is the reason. And now I have no condition to try rebuild curl. – liuxiaoyong Feb 20 at 2:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.