Introduction to the

Fiddler is a packet capture tool for Windows. There are many articles about the introduction and use of Fiddler panel on the Internet, but I won’t go into details. This article mainly discusses the packet capture configuration of PC and mobile terminals.

The PC captures HTTP packets

Fiddler is also smart. When Fiddler runs, it creates a proxy service locally. The default address is: 127.0.0.1:8888, when we start Fiddler, it will automatically set proxy for our browser, so we can see the requests of the browser in Fiddler panel, but only HTTP requests can be captured at this time, and HTTPS requests need further configuration.

If Fiddler doesn’t catch a request after you start it, check to see if your browser is using proxy software.

Configure HTTPS capture on the PC

To configure HTTPS, go to Tools > Options > HTTPS on the top TAB and select it as shown in the following figure. So the PC catches the HTTPS request and we’re configured. (There will be a popbox when it is checked for the first time, we can select confirm)

The mobile end captures HTTP packets

To configure packet capture on mobile devices, go to Tools > Options > Connections on the top TAB and check it as shown in the following figure. The default port is 8888, we can change that.

Next, we need to configure the mobile terminal to ensure that the mobile phone and computer are connected to the same network, that is, in the same LAN.

Firstly, there are many ways to check LAN IP address. Here is a function provided by Fiddler. We can see our IP address by hovering the mouse over Online.

The next step is to configure the mobile terminal agent. Take the author’s iPhone as an example, configure the mobile phone agent to be manual, the server is the local IP (the author is 192.168.10.50), and the port is 8888. (The port is the default. If the port has been modified in the configuration above, you need to modify the port accordingly.) Once stored, Fiddler can capture requests from your phone, but only HTTP requests.

Configure the mobile terminal to capture HTTPS packets

On the mobile end, we need to install the certificate so that Fiddler can capture the HTTPS request. Here, we need to open LAN IP: port in the browser with the mobile phone. Taking the author’s iPhone as an example, we need to open 192.168.10.50:8888, and then we can access the following page.

Next we just need to click on FiddlerRoot Certificate to install the certificate on the phone. Here specific installation steps the author will not be introduced in detail.

After the installation, our mobile side grab HTTPS package is also done.

This article is based on the author’s iPhone as an example to explain, android phone operation steps are the same will not be introduced.

Pay attention to

  1. It should be noted here that although we have configured HTTPS packet capture, if we open the link in wechat, we will still be prompted to jump to the mobile browser.
  2. Secondly, if our project is configured with wechat authorization, the web page cannot be opened in the browser (students who have done wechat public account development should be very clear). So what do we do here? Using ours, of courseWechat developer tools! We need to capture someone’s request. All we need to do is log in to the wechat developer tool using someone’s wechat account and then we can capture the request.
  3. What if you think the simulator of wechat developer tool is not working well and want to see the request on your phone? I recommend a great plugin called vConsole that allows you to see requests directly from your phone, eliminating the need to use Fiddler. (But this is only for the test environment, after all, we will not deploy vConsole in production environment).

Afterword.

Here we go if you don’t know how to configure Fiddler grab you hit me. If there is error in this article, please inform, thank you! If this article helped you, please give it a thumbs up