1, the preface

The company needs to use UNI for platform synchronous development. Bytedance’s real machine debugging is annoying. Ios can not be real machine debugging, even if you use Android to enter the debugging can only see send requests. If you respond, you’re done. So much so that if you want to see the response data for every request, you have to console it out. Which brings us to today’s article. How to use Charles for small program packet capture.

2, download

Charles Download

3, installation,

There’s nothing to talk about. No brains.

Next => select I accept the terms is the License Agreement => Next => Next => Install => Finish

4, configuration,

4.1 Preparations

  • The computer has Charles on
  • Your phone is on the same network segment as your computer.

Then we just turn on our phones and go to the wifi details page. Set port 8888 for the proxy to forward to the IP address.

The following to Windows10 + iphone11Pro for example

  1. On Windows, open the command line (Ctrl+R, enter CMD enter) and enteripconfigenter
  2. copyIPv4 Addressipaddress
  3. Turn on your phone and connect to your WiFi. Click wifi to enter the details page and swipe to the bottom. See a proxy, open it. And then enter what we copiedIPv4 AddressThe IP address and port number of the8888, click Save
  4. After the mobile phone clicks save, if your input is correct, the computer will prompt at this timeConnection from your IP addressThe popup window. We clickAllowCan.

4.2 Viewing HTTP Packages

Once you’ve done this, all you need to do is make sure your computer’s software starts. And mobile phones and computers stay on the same network segment. The HTTP packets that our phones access will be caught by Charles.

4.3 Viewing HTTPS Packets

After doing this, you can only view HTTP packages, if HTTPS packages will be displayed as unknown. At this point, I’m going to continue.

  1. inCharlesMenu bar findHelp. Click on theSSL Proxying, click on theInstall Charles Root Certificate on a Mobile Device or Remote Browser.
  2. The software will pop up a prompt box, which will show your port number.HTTP proxy on your IP address :8888, you can check whether the IP address is the same as the prompt when setting up the proxy on your phone.
  3. After making sure it’s consistent, turn on the phone. Go to the browser and enter the addresschls.pro/ssl. Click Permit. Then click Close to install the certificate. If you have IOS 10 or above, go toSet up theTo install the certificate.
  4. inCharlesMenu bar, selectProxy. chooseSSL Proxying Settings. inIncludePlace, clickAdd. Enter both Host and Port*Number. Click on theOKCan.
  5. That’s it. You can now access it on your phonehttpsAgreement of the website to see the effect of packet capture.

If you have any questions in this article, please contact wechat gdgzyw. If I want to make friends, I do.