about
Whistle is a cross-platform Web debugging agent based on the Node implementation
Similar tools: Fiddler
Advantages:
- Node-based, cross-platform
- It is easy to operate
- Powerful, it basically covers all the functions that can be implemented by the packet capture debugging agent, and all operations can be implemented in the same way as configuring hosts
Installation and Startup
-
Install the Node
-
Whistle NPM install -g whistle
-
Start Whistle W2 Start
-
Configure the default proxy server address 127.0.0.1 and proxy port 8899
4.1 On the Web, You are advised to use SwitchOmega for Chrome (If the proxy server cannot be configured in China).
4.2 IOS Click the blue exclamation mark next to WiFi, configure proxy at the bottom, set it to manual, set the server address to PC IP, and port 8899. Prerequisite: The PC and mobile phone networks must be in the same domain
-
Enable capturing HTTPS requests by installing the root certificate
5.1 windows
5.2 IOS: Set Certificate Trust: Universal — about local — Certificate Trust Settings
Configuration and Use
caught
After the configuration is complete, packets can be captured for access requests from the mobile or Web terminal and details can be viewed
Configuring proxy Forwarding
Configure proxy forwarding directly in Rules. The local project address is 127.0.0.1:8080. The following configuration forwards the proxy forwarding to www.test.com
Local replacement
We can mock out the result we want by replacing the return value with a local file when accessing a request, indicating that the return content with the interface *.myysq.com.cn/park/get-park-info matches the local base-info.json file
Similarly, you can replace the return result of interface A with that of interface B, or you can replace HTML, CSS, and JS files
Injecting code
Write the code that needs to be injected in Values, such as the mobile vConsole debugging console
1. Vconsole source code
2. Write logic
3. Inject code in Rules, so that the vConsole will appear under matched web pages
4. The page is displayed
The problem
After using NVM for a long time, suddenly one day NVM switched the NPM version, and the mobile agent was no longer connected to the Internet, for some reason…
Solution 1:
Uninstall all node environment and reinstall once, the problem resolved, the cause may be the Windows system pot…
Note: Be sure to use Stable Version of Node, currently using V12.16.1
Solution 2:
Official Documentation solution wproxy.org/whistle/ins…