设置->无线局域网->选和电脑同一网络的无线->配置代理->手动ios
服务器配置电脑的IP,端口设置为8888浏览器
在Charles->help->ssl proxysettings->选mobile 那行,会弹出个提示,服务器
在手机浏览器里访问提示里出现的网址(个人是chls.pro/ssl),安装网络
Navigate to Settings > General > About > Certificate Trust Settings and turn the switch on for your custom certificate.iphone
若是最后一步没有配置的话,访问会报错:SSLHandshake: Remote host closed connection during handshake
代理
通常手机上的代理配置好后,打开Charles会有个弹窗,是否容许代理,点容许,要是点错了,能够在Proxy->Access control setting里把IP加上。code
Proxy->SSL Proxying ->Add , 在host里填,port输入框里填ip
参考地址:
https://www.neglectedpotential.com/2017/04/trusting-custom-root-certificates-on-ios-10-3/ssl