charles使用——https抓包

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/

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容