This is the 7th day of my participation in the November Gwen Challenge. Check out the details: The last Gwen Challenge 2021

Step 1: Install Charles

Make sure Charles is available. Specific resources are not easy to put directly. If you need them, you can search the Internet yourself

Step 2: Install the certificate for Charles on the PC

On the installation interface, click Certificate Installation-OK, and then enter the certificate import interface. If you select the storage location, click the current user, and click Next without any modification. Then the certificate storage path interface appears, this interface selection is more important, select all certificates in the following storage, then click Browse, the pop-up dialog box, select the trusted certificate issuing authority, click OK and next to complete the installation.

Step 3: Android advanced Settings through the current Wifi, set up the proxy to connect to Charles

First, make sure your phone is connected to the same LAN as your computer.

Look at your computer’s IP address (enter ipconfig at the CMD command line prompt), and then configure the proxy based on your computer’s IP address. The advanced options are displayed. Set the proxy server to manual, enter the computer IP address for the proxy host name, and enter 8888 for the proxy server port (8888 is the default port, you can also change). Just save it

After the connection, Charles will prompt whether to Allow mobile phone access according to the reason. Click Allow.

Step 4: Install the Android certificate

Enter CHLS. Pro/SSL in the browser of your mobile phone (it is recommended to use the browser of your mobile phone, uc can be downloaded but cannot be opened). After downloading, the certificate installation page will be displayed, and fill in your name (Charles is optional).

Notice that I do not support the opening of such files, at this time, change Google Browser to re-enter the url to download the installation, huawei browser and QQ browser can not be installed.

After downloading and installing, the system will prompt you to enter the screen lock password. (If you have not set the screen lock password, it may lead you to the page for setting the screen lock password. After setting the screen lock password, you can try again.) First give the certificate a name, such as Charles, credential use default VPN and application, click OK, the system will prompt you to install Charles.

Step 5: Test packet capture

Open baidu of mobile phone, you will find Charles’s corresponding network packet. However, many Https packages captured are unknown. In this case, you need to configure the security certificate. First, we need to configure the security certificate of the browser.

Then don’t forget Charles enables HTTPS packet capture:

Enable SSL proxy and add all locations to proxy.

Finally, mobile phones and browsers can capture Https data:

Step 6: Set up the DNS mapping

We need to do a DNS mapping to debug the next Bug. Let’s see where Charles is enabled.

\