一、證書安裝
1、安裝證書,Help -> SSL Proxying -> Install Charles Root Certificate
image.png
2、找到Keychain Access軟件(一般會自動打開),搜索"charles"可以看到證書有個x圖標,說明證書還不能使用
image.png
3、信任證書,雙擊證書 -> Trust -> Always Trust
image.png
4、重新打開Keychain Access軟件,可以看到Charles證書沒有報錯了
image.png
二、證書使用
1、解決單個https亂碼
-
選中亂碼對應的host-> 右鍵-> Enable SSL Proxying
image.png -
可以看到簡書https沒有亂碼了
image.png
2、解決所有https亂碼
-
Proxy->SSL Proxying Settings...
image.png -
SSL Proxying-> Enable SSL Proxying勾選
image.png -
Add-> Host處配置*-> 點擊OK
image.png -
可以看到所有的https都不亂碼了
image.png