Charles Mac

HTTP packet capture

  • Open the Charles program
  • Check the IP address of the Mac computer, and you can view it in System Preferences -> Network. For example, my IP address is: 192.168.1.7
  • Open the iOS settings, enter the current wifi connection (the Mac is in a local area network), set the HTTP proxy group, and fill in the server with the IP obtained in the previous step, namely 192.168.1.7, and the port with 8888:

iphone.png

  • On the iOS device, open the app you want to capture packets for network operations
  • Charles pops up a confirmation box, click the Allow button

HTTPS packet capture

You need to download the Charles certificate http://www.charlesproxy.com/ssl.zip , extract it and import it to the iOS device

Click Install again, the certificate is installed successfully

Then click the Proxy button on the toolbar of Charles, select Proxy Settings...
switch to the SSL tab, select Enable SSL Proxying, you need to fill in the domain name and port to be captured in the Locations form of the SSL tab in the previous step, and click the Add button. In the pop-up form, fill in the domain name for Host, such as api.instagram.com and 443 for Port.

You can see the data, and the packet capture work is done.

Note: When we do not capture packets, Charles will be closed. At this time, iOS cannot access the network because the proxy (that is, Charles) is set. At this time, the proxy in iOS needs to be closed. This is often when capturing packets. made a mistake.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325504410&siteId=291194637