Lu Nima’s hospital for Treatment

In addition to mastering HTML, CSS, JS, and a bunch of other frameworks, being a modern front-end requires you to know how to capture and change packages. Of course, regular web sites or self-developed we often use chrome or Firefox browser developer tools can be solved. But often there will be some special circumstances, such as the SPA website, after the interface request such error happens Automatically jump back to the login page, this is very hurt, we can’t know what went wrong, etc., of course, many other strange situation we can’t meet our browser developer tools (such as: grab can only be opened in the WeChat web page). This is where additional packet capture tools are needed:

  • Win user: Fiddler
  • MAC user: Charles

There are many related uses of Fiddler on Baidu, but we won’t go into them.

Today we’re talking about iPhone Charles.

Conventional mobile phone through Charles packet capture method baidu search a lot, nothing more than mobile phone change agent to the LAN COMPUTER IP+ Charles port (default 8888);

Then select “allow” in the pop-up window of Charles. When you open a webpage casually, you can see the webpage domain name in the left window of Charles, which can meet the packet capture of most websites.

However! Some websites use HTTPS and SSL encryption, which is very troublesome for us to catch. According to the conventional method, there is a small lock icon in front of the domain name in the left window of Charles.

So what to do?

  • We click Help —- SSL Proxying —- Install Charles Root Certificate on a Mobile Device or Remote Browser

  • Copy the CHLS. Pro/SSL address in the popup frame and open this address in the mobile device, the trust certificate will be automatically installed on the mobile phone

  • We select Proxy —- Proxy Setting

  • Check the Proxies TAB under Enable Transparent HTTP proxying and OK

  • Select Proxy —- SSL Proxying Setting

  • Select the SSL Proxying TAB, tick Enable SSL Proxying, click Add and enter the URL (wildcard) and port number (443 is usually used for SSL) and then OK

You think that’s the end of it? One last, most crucial step is needed

It used to be that way, but as the iPhone system has been updated, ever since the iPhone has been on Ver 10.3 (I’m not sure it started with VER 10.3, but it’s probably over before VER 10), we’ve actually installed trust certificates, But the trust certificate installed by default is actually closed, so the HTTPS website opened by Charles is still unable to be grasped

We went to the Settings on iPhone —- universal —- about local —- certificate trust Settings where you can see all your self-installed certificates, we found Charles Proxy CA (XXXXX…… Click on the right slider to turn it on

OK set up!

Let’s go back and try opening an HTTPS website on your phone

Time for a miracle!

We saw that in the address bar on Charles left, the small lock in front of HTTPS website was gone. We clicked one of the contents, and all the information was in a glance! We got everything!