Fiddler packet capture for HTTP debugging proxy
introduce:
Fiddler is a very popular and practical http packet capture tool. Its principle is to open an http proxy server locally, and then it will forward all http requests and responses. Therefore, it is much easier to use than the general firebug or the packet capture tool that comes with chrome. Not only that, it can also support some advanced features such as request replay. Obviously it can support http capture for mobile applications.
Download and install:
-
Download link: https://www.telerik.com/download/fiddler/fiddler4
-
Optional disk installation, after the installation is successful, the following prompt will pop up on the web page:
use:
- Open Fiddler and open the remote connection.
选择 Tools–> Telerik Fiddler Options–>Connnections–>Allow remote computers to connect.
If you need to configure the capture of the Https protocol, perform the following steps:
1.1 Configure Https configuration in Fiddler:
Tools–> Telerik Fiddler Options–>HTTPS–>勾选Decrypt HTTPS traffic和Ignore server certificate errors
1.2 Install the HTTPS certificate on the android phone** (this step needs to be done after the configuration in step 3 is successful, that is, after the android access is successfully proxied by Filder)**
Special attention : the mobile phone and the computer need to be connected to the same network and have the same network outlet.
Through the online window of fiddler, you can also check the computer ip:
In addition, you can also use cmd to execute ipconfig to check the ipv4 of the computer.
On the mobile phone, visit http://computer ip4:8888 through the browser, the following page appears, click "FiddlerRoot certificate" and install the certificate.
Note : If you cannot download, go to setting–>Advanced Settings–Security–>Credential Storage–>Install from sd–>Click on the FiddlerRoot.cer file–>Verify this configuration, click Trust Credentials–>User. For more details, refer to Fiddler-config-android .
Finally, after the certificate is successfully installed, it can be viewed in the trusted credential user (the name of the credential is self-initiated):
-
Get your computer's IP by entering the ipconfig command line:
-
In the settings of the mobile phone, select WLAN, find the WIFI that needs to be connected, and press and hold, a pop-up window will appear. Modify the network, check Show advanced options.
Click the manual mode in the proxy, enter the ip address of the computer in the server host name, enter 8888 (the default port of Fiddler) in the port, and click Save.
-
Start the application program on the mobile phone (for example, visit Baidu through the browser), and you will be able to see the captured request (the upper part of the right view) and the response (the lower part of the right view) in Fiddler.
Resource reference:
- Fiddler official website: http://www.telerik.com/fiddler
- Fiddler (various configurations and usage) tutorial: http://docs.telerik.com/fiddler/configure-fiddler/tasks/usefiddlerasreverseproxy
- https://blog.csdn.net/qq_40758284/article/details/127074242