whistle README

The project's README from github.com/avwo/whistle. As one markdown file: README.md.

whistle logo

whistle

NPM version node version npm download NPM count License

中文 · English

Whistle(发音 /ˈwisəl/)是基于 Node.js 的跨平台网络抓包与调试工具,特点如下:

  1. 功能强大
    • 支持 HTTP、HTTPS、HTTP/2、WebSocket、TCP 的抓包与修改请求/响应
    • 支持 HTTP、HTTPS、Socks、反向代理等多种代理模式
    • 内置常用调试工具:Weinre(远程 DOM 检查)、Console(查看 console 日志)、Composer(请求重放与编辑)等
  2. 操作简单
    • 通过规则配置即可修改请求/响应
    • 提供一站式管理界面:抓包、规则、插件、Weinre/Console/Composer 等集中管理
  3. 可扩展
    • 支持插件扩展规则与界面功能
    • 可作为 NPM 模块在项目中引用
  4. 跨平台
    • 支持 macOS、Windows、Linux(Ubuntu / Fedora)等桌面系统
    • 支持无界面 Linux 服务器环境

安装(推荐)

桌面用户(macOS/Windows/Linux)推荐使用 Whistle 客户端:https://github.com/avwo/whistle-client

客户端可以免去大部分手动安装与配置步骤

无界面 Linux / 服务器 安装(命令行)

按以下 4 步在无界面服务器上快速部署:

  1. 安装 Whistle(推荐使用 npm)
    • 需要先安装 Node.js:https://nodejs.org/
    • 安装命令:npm i -g whistle

      也支持 Homebrew:brew install whistle

  2. 启动 Whistle
    • 命令:w2 start
  3. 安装根证书(用于 HTTPS 抓包)
    • 命令:w2 ca
    • 安装过程中可能需手动确认:
      • Windows:最后选择 “是 (Y)” 确认
      • macOS:可能需要输入开机密码或 Touch ID 验证
  4. 设置代理
    • 命令:w2 proxy
    • 设置指定 IP: w2 proxy "10.x.x.x:8888"
    • 关闭系统代理: w2 proxy 0

其它代理方式:

快速上手

详细使用指南与示例请查看官方文档:https://wproxy.org/docs/getting-started.html

常见命令速查

License

MIT(详见 LICENSE 文件)

whistle (avwo/whistle)

proxy-server
Searching Database…

15.7K ·GitHub
What is this?Whistle is a cross-platform web debugging proxy built on Node.js — it captures and lets you modify HTTP, HTTPS, HTTP/2, WebSocket and TCP traffic, in the same niche as Charles or Fiddler (both are among its GitHub topics).
Is it a desktop app, or something I run from the terminal?Both: on macOS, Windows and Linux desktops there's a Whistle client that removes most manual setup, while servers are driven with w2 commands — and either way you manage capture, rules and plugins in one built-in UI.
How do I get it running?Four steps: npm i -g whistle (or brew install whistle), w2 start to launch, w2 ca to install the HTTPS root certificate, and w2 proxy to point traffic at it (w2 proxy 0 turns the system proxy off). Desktop users can skip most of this with the Whistle client.
Do I need anything preinstalled before it will run?Node.js — whistle ships as an npm package and its package config asks for Node 14 or newer. Homebrew works as an alternative installer on macOS.
What's the fiddliest part of setting it up?HTTPS interception: you must install whistle's root certificate (w2 ca), and the OS walks you through it manually — pick 'Yes' on Windows, and macOS may ask for your login password or Touch ID.
Which systems does it run on?macOS, Windows and Linux desktops, with Ubuntu and Fedora called out by name; nothing ties it to a single operating system.
Would it run on a headless server, or does it need a desktop?Yes — headless Linux server environments are explicitly supported; the command-line install path above is designed exactly for GUI-less machines.
What can it do besides passively capturing traffic?Plenty: you can rewrite requests and responses through rule configuration, replay and edit requests with the built-in Composer, inspect a remote page's DOM with Weinre, and view page console output — all from the same UI.
What if I can't or don't want to set the system proxy?Whistle also runs as an HTTP, HTTPS, Socks or reverse proxy. The README recommends the ZeroOmega Chrome extension for switching proxies between browsers, and Proxifier for apps that have no proxy settings of their own.
Can I extend it or embed it in my own project?Yes — plugins can extend both the rules and the UI, and whistle can also be pulled into a project and used as an NPM module.
Creator
avwo
Size
101.4 MB
Stars
15.7K
Updated
CommitOct 11
Age
11y
Commits · 90 Days