Whistle (pronunciation [wɪsəl], Pinyin [wēisǒu]) based on cross-platform web debugging proxy tool Node implemented similar tools on the Windows platform Fiddler , is mainly used to view, modify requests HTTP, HTTPS, Websocket response, also can be used as an HTTP proxy server, the response is different from the mode request Fiddler by modifying the breakpoint, Whistle uses a similarly configured system hosts manner, all operations can be implemented by configuring to support the domain name, path, regular expressions, wildcards, through path with other matching mode , and by Node module extension : start Whistle installation, requires the following four steps: mounting Node , installation Whistle , start Whistle , configuration agent
Whistle also nodejs develop cross-platform web debugging proxy tool, view, modify or construct http (s), websocket request response data.
Tools address: https: //github.com/avwo/whistle
Introduction and Relevant usage: https: //github.com/avwo/whistle/wiki
Help Documentation: http://wproxy.org/whistle/
1. Install Node
whistle support v0.10.0
steps above version of Node, to obtain better performance recommendation Node install the latest version can ignore this step, go directly to the installation whistle
- Windows or Mac systems, visit https://nodejs.org/ , installation LTS version of Node, the default installation.
- Installation under Linux source code is recommended: From the Node official website to download the latest version of the Source Code (or use
wget
the download command), unzip the file (tar -xzvf node-vx.y.z.tar.gz
after) entering after extracting the root directory (node-vx.y.z
), followed by the implementation./configure
,./make
and./make install
After installing the Node, execute the following command to view the current version of Node
$ node -v
v4.4.0
If the version number of Node normal output, expressed Node has been successfully installed (Windows systems may need to re-open cmd)
2. Install the whistle
Node After successful installation, run the following command to install npm Whistle ( the Mac or Linux users need to add a non-root before the command line sudo
, such as:sudo npm install -g whistle
)
$ npm install -g whistle
The default npm mirrored in a foreign country, sometimes very slow installed or not installed situation occurs, you can use a mirror taobao installation speed up installation:
$ npm install cnpm -g --registry=https://registry.npm.taobao.org
$ cnpm install -g whistle
或者直接指定镜像安装:
$ npm install whistle -g --registry=https://registry.npm.taobao.org
After the whistle the installation is complete, execute the command whistle help
or w2 help
, if they can help whistle normal output, expressed whistle has been successfully installed.
3. Start whistle
The latest version supports three equivalent of whistle commands
whistle
,w2
,wproxy
Start whistle:
$ w2 start
Note: If you want to prevent others from accessing the configuration page, you can add login user name and password at startup -n yourusername -w yourpassword
Restart whsitle:
$ w2 restart
Stop whistle:
$ w2 stop
Debug mode is activated whistle (mainly for viewing anomalies and plug-in development whistle of):
$ w2 run
After starting the finished whistle, the final step required to configure the proxy
4. Configure Agent
Proxy server: 127.0.0.1 (if deployed on a remote server or virtual machine, change the ip to the corresponding server or virtual machine)
Default Port: 8899 (if the port is occupied, you can start is by
-p
specifying the new port, more information can be executed through the command linew2 help
Browser proxy: Install Chrome browser proxy plug-in: Recommended installation SwitchyOmega
PS: If you have finished configuring the proxy, the phone can not access the whistle may be located remotely access a computer firewall limits the whistle of the port, turn off the firewall or white list
Access Configuration page
After starting whistle and you configure the proxy, with the Chrome browser (compatibility issues due css interface only supports Chrome browser) to access the configuration page, if you can open the normal page, whistle to start the installation is complete, you can begin to use, can be two ways to access the configuration page:
- Mode 1: domain names http://local.whistlejs.com/
- Embodiment 2: access by ip + port, such as in the form of
http://whistleServerIP:whistlePort/
EG http://127.0.0.1:8899 - Embodiment 2: command line parameter
-P
port custom webui ports (xxxx
represented by the port number to be set), the two supports custom port access, supports http://127.0.0.1:port or localhost: port
Download rootCA certification
Ip phone connected to the computer and specify the port, you can view the request data in the browser.
Set intercept https:
1. Click on the menu https, download rootCA certificate, check the Intercept HTTPS CONNECTS
2. Handset scan code to download rootCA certificate, and import to the phone, where consistent with Fiddler, you can also enter the browser rootca.pro to
3. Access https site, you can catch data
PS: Currently whistle tool has been on the line in the chrome shop, you can chrome: installation by searching whistle, whistle download plug-ins // apps in
Access Interface