Basic configuration of Charles mobile packet capture

1. Install Charles packet capture tool

Official website: https://www.charlesproxy.com/

2. Computer-side packet capture configuration

1. Remove the check mark on Proxy-macOS Proxy, otherwise it will capture the package on the computer side

2. Proxy-Proxy Settings set charles proxy, the default is 8888, check the corresponding option

3. Proxy-SSL Proxying Settings configures Charles to allow grabbing https packages. Check Enable SSL Proxying, Add a location, and grab the https of all domain names through the wildcard *.

 4. Help-SSL Proxying-Install Charles Root Certificate installs the certificate into the macOS system, and trusts the certificate in the keychain

 5. Help-Local IP Address Get the IP address of the computer where Charles is running

 3. Mobile phone packet capture configuration

1. The mobile phone is connected to the same wifi LAN as the current computer. In the iPhone's "Settings" -> "Wireless LAN", you can see the name of the currently connected wifi, and by clicking the details button on the right, you can see the detailed information of the currently connected wifi, including IP address and subnet mask and other information. At the bottom of it is the "HTTP Proxy" item, we switch it to manual, and then fill in the IP of the computer where Charles is running, and the port number 8888, as shown in the figure below:

2. Install the certificate on the mobile phone, Help-SSL Proxying-Install Charles Root Certificate on a Mobile Device or Remote Browser. Enter the address chls.pro/ssl in the mobile browser to download the certificate.

3. In Settings -> General -> About This Machine, trust the installed certificate.

Now you can smoothly grab various http/https requests on the phone. 

 

Guess you like

Origin blog.csdn.net/lfq1996/article/details/130933617