付费求解 curl ssl/tls 突发状况,请求 https 站点均失败。

2021-11-01 12:46:26 +08:00
 hanssx

付费 30 红包送给第一位帮助解决此问题的 V 友,以聊表心意。

环境

物理机 Windows 10

C:\Windows\system32>curl -V
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL

虚拟机 Linux Mint 19.3 ,等价 Ubuntu 18.04 LTS

# mint @ mint-virtual-machine in ~ [11:38:30] 
$ curl -V
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 

在虚拟机中,前几天下午用 pycharm 的时候突然弹出个公司的证书,不知道为啥,就正常写代码中。

后面尝试发现所有 https 站点连接都有问题,比如下图中的某度,

按照 curl 问题指引 https://curl.se/docs/sslcerts.html ,下载 cacert.pem ,运行依然没有效果

同时物理机上面的 windows curl 也不好使了

忽略掉证书是可以的,比如curl -v https://www.baidu.com --insecure 但是这并不是解决方案啊,另外其他使用 HTTPS 的工具好像也连不上 HTTPS 站点了,像是系统问题?但是实在想不明白物理机和虚拟机同时不能请求 HTTPS 的原因是啥。

2087 次点击
所在节点    HTTP
21 条回复
zu1k
2021-11-01 15:47:35 +08:00
@hanssx 我不要,恰好我近期也在做 MITM 相关,借贴宣传一下,https://github.com/zu1k/good-mitm ,用 MITM 技术来为自己服务

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/812102

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX