1 introduction

When developing, Fiddler + Willow is indispensable software, which is convenient for us to switch the environment and debug the agent. Although they are very powerful, memory leaks are inevitable in the process of use. If Fiddler is left on for a whole day, the computer will become extremely slow and sometimes even jammed

After using Whistle for a while, I found that it can replace the functions of Fiddler + Willow. It can also be connected to mobile phones for user debugging

Whistle is a cross-platform Web debugging agent based on Node. Similar to Fiddler on Windows, it is used to view and modify HTTP, HTTPS, Websocket requests and responses. It can also be used as an HTTP proxy server. Unlike Fiddler, which modifyrequests and responses through breakpoints, Whistle uses a configuration method similar to hosts. It supports multiple matching methods, including domain names, paths, regular expressions, wildcards, and wildcard paths. It can be extended through the Node module

2. Get started

Whistle supports Node versions v0.10.0 and older, and it is recommended to install the latest version of Node for better performance

The installation

npm install -g whistle
Copy the code

Start the

The default port number is 8899

w2 start -p 8899 
Copy the code

Browser Proxy Configuration

Install Google extension SwitchOmega

There are two ways to install Google Extensions

Configure port 127.0.0.1:8899

access

Browser access to 127.0.0.1:8899

Install a CERTIFICATE on the PC

  1. Click the QR code to download the certificate and install the certificate portal:

  2. Select grab HTTPS

  1. Win10 install trust certificate tutorial in PC side install certificate, win10 install trust certificate tutorial

Shut down

If no proxy is used, close it

w2 stop 
Copy the code

3 Function Description

Interface is introduced

  1. NetworkCaught interface
  2. RulesThe host configuration
  3. ValuesProxy files
  4. PluginsPlugins, temporarily useless

Commonly used method

  1. Rules on page
https://fit.oa.fenqile.com/oa/cf/user/session.json ‪ # agent local files E: \ mock \ lepay \ session json # agent whistle values file https://fit.oa.fenqile.com/oa/cf/user/session.json file:// {session. Json} # request replacement https://fit.oa.fenqile.com/LxjgFilesys00/upload?scenes=product&output_type=json https://lepay.oa.fenqile.com/LxjgFilesys00/upload?scenes=product&output_type=json # # regular reverse proxy pattern file://path1 | path2 | pathN until you find the first in line with the file support lepay_app lepay_m lepay_sale * * fenqile.com/entry/ file://E:\lepay\feature\lepay_app\devtools\entry\|E:\lepay\feature\lepay_m\devtools\entry\|E:\lepay\feature\lepay_sale\d evtools\entry\ **.fenqile.com/devtools/ file://E:\lepay\feature\lepay_app\devtools\|E:\lepay\feature\lepay_m\devtools\|E:\lepay\feature\lepay_sale\devtools\ **.fenqile.com/htdocs/ file://E:\lepay\feature\lepay_app\htdocs\|E:\lepay\feature\lepay_m\htdocs\|E:\lepay\feature\lepay_sale\htdocs\Copy the code
  1. through+ValuesYou can quickly add responses tovaluesAnd then throughfileAgent quick debugging

4 Mobile phone agent debugging

Start the service

w2 start -p 8899
Copy the code

Set up the network

[Settings] – [Select wifi] – [Configure proxy] – [Manual] – [Server: wifi IP] – [Port: 8899]

Download the certificate

Install the certificate

IOS:

[Setup] – [Description file and device Management] – [Installation]

[General] – [about this machine] – [New certificate Settings] – [Trust]

Android:

[Certificate] – [Installation]

access

You can have fun developing

advice

The whistle’s official website

The node’s official website