https抓包
https請求打breakpoints
請求中如果有這個報錯:SSL Proxying not enabled for this host: enable in Proxy Settings, SSL locations.
右鍵請求,選擇Enable SSL Proxying,選上Beakpoints.
image.png
前面的步驟完成后,在charles的工具欄“Proxy”中選擇SSL Proxying Settings可以看到你自己打斷點的請求,端口號是443。
image.png
證書
如果在請求中發現這個錯誤信息: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"。就能夠正常斷點了。
授信后如下圖
image.png
可以查看官網的說法。
https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/