1. Download Charles
: https://www.charlesproxy.com/download/
2. Install Charles's certificate
Select Help->ssl proxying->install Charles Root Certificate
Open the keychain and set the trust Charles Root certificate
3.Charles Turn on HTTPS monitoring
First turn on HTTP snooping
Set the port number of the HTTP listener and the port number of the socket listener
Turn on HTTPS monitoring below
Set the port number of HTTPS listener, the asterisk before the port number can be replaced by the domain name
4. Install the Charles certificate for your iphone
Certificate: https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
Locate the iOS device location download, download the installation using your phone's Safari browser, and then add the Trust
Trust Charles's certificate on your phone:
5. Set up an agent for iphone clients
Open Settings-Wireless LAN--connect to WiFi on Mac and LAN
After connecting, click WiFi Name, scroll to the bottom of the page, HTTP proxy select manual and then set the server for your Mac computer IP address, port number set to 8888
6. Open Charles to see if the page data for HTTPS is displayed properly
Using Charles can also crawl data packets, analysis of unknown site authentication method, in fact, this is the purpose of my busy long time this afternoon, is to find out our company app use UIWebView load page Why old slow, always suspected that the certification has a problem, sure, certification is not correct, It's really slow.
Using Charles to detect packets on an HTTPS web site