接口测试,curl传输命令,无返回信息

问题

charlles抓包,curl传输命令,无返回信息

报错信息

videl@DESKTOP-UMVKH7Q MINGW64 ~
$ curl -X GET “https://httpbin.ceshiren.com/get” -H “accept: application/json” --proxy http://127.0.0.1:8080
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- 0:00:01 --:–:-- 0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

环境

windows,gitbash

网站的证书没问题,你的代理会自己重新签名,会导致代理签发的证书不被curl命令识别。你可以加个-k参数。还有个办法就是把代理的证书加到你的系统信任里。


感谢思寒老师指导,查看证书已经在受信任里面了。

确认下你说的“把代理的证书加到你的系统信任里”,是否是图片上的位置

这个问题还是有点困扰,希望得到老师的指导和帮助

你是学员嘛,可以找助教帮你看看。一般charles是有自己的代理配置和证书配置手册的。你通过浏览器访问可以看出来域名是否被正确的签名或者被系统信任了。