1. pc上配置 Charles 根证书
![](http://upload-images.jianshu.io/upload_images/1116587-258b9fa545a210a4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Paste_Image.png
之后会弹出钥匙串,如果不弹出,请自行打开钥匙串,如下图:
![](http://upload-images.jianshu.io/upload_images/1116587-f9dee2972d918100.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
钥匙串
系统默认是不信任 Charles 的证书的,此时对证书右键,在弹出的下拉菜单中选择『显示简介』,点击使用此证书时,把使用系统默认改为始终信任,如下图:
![](http://upload-images.jianshu.io/upload_images/1116587-7869f742b0990853.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
显示简介
2. 在移动设备上配置证书
如下图,选择在移动设备上安装 Charles 根证书:
![](http://upload-images.jianshu.io/upload_images/1116587-07fdceeda33a03f2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Paste_Image.png
会弹出一个提示框,如下图:
![](http://upload-images.jianshu.io/upload_images/1116587-7439f200990d90b3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
提示框
进入手机设置代理的ip和端口号
然后打开手机的浏览器,输入
charlesproxy.com/getssl
,安装证书
点击安装即可,如果出现的不是这个界面,那么把链接换成
https://www.charlesproxy.com/documentation/additional/legacy-ssl-proxying/
,点击安装 itself 后面的 here 就可以了。