https抓包
https请求打breakpoints
请求中如果有这个报错:SSL Proxying not enabled for this host: enable in Proxy Settings, SSL locations.
右键请求,选择Enable SSL Proxying,选上Beakpoints.

前面的步骤完成后,在charles的工具栏“Proxy”中选择SSL Proxying Settings可以看到你自己打断点的请求,端口号是443。

证书
如果在请求中发现这个错误信息:You may need to configure your browser or application to trust the Charles Root Certificate. See SSL Proxying in the Help menu.
是因为证书的问题。
在Charles 的 Help 菜单中选择 "SSL Proxying > Install Charles Root Certificate". 之后Keychain Access会打开,创建一个证书。创建完以后 找到 "Charles Proxy..." 的证书,双击,然后选择扩展 "Trust" 选项,把"When using this certificate"内容从"Use System Defaults" 改成 "Always Trust"。就能够正常断点了。
授信后如下图

可以查看官网的说法。
https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
网友评论