curl:(35) 错误:140770FC:SSL 例程:SSL23_GET_SERVER_HELLO:未知协议

Yog*_*war 6 ssl https curl

我正在尝试连接配置为使用 ssl 的远程 nginx 服务器。

我发出了一个命令

$curl  https://10.73.80.197:8080/ 
Run Code Online (Sandbox Code Playgroud)

但在那之后我收到错误。这是整个日志-

* Hostname was NOT found in DNS cache
*   Trying 10.73.80.197...
* Connected to 10.73.80.197 (10.73.80.197) port 80 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
* Closing connection 0
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Run Code Online (Sandbox Code Playgroud)

小智 7

如其他几篇文章所述:

curl:(35) 错误:1408F10B:SSL 例程:ssl3_get_record:版本号错误

Curl 返回“未知协议”

这种 curl 错误通常是通过 https 而不是 http 使用网络代理的结果

你应该检查你的https_proxy 环境变量

如果你有类似的东西

https://myproxy.example.com:8080/

那么你应该改变并设置以下内容

https_proxy = HTTP://myproxy.example.com:8080 /