Top Related Projects
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
A fully configurable http/https proxy in NodeJS
A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
A fast,scalable,distributed game server framework for Node.js.
A full-featured http proxy for node.js
Quick Overview
Whistle is a cross-platform web debugging proxy tool based on Node.js. It provides a powerful set of features for capturing, inspecting, and modifying HTTP/HTTPS traffic between clients and servers, making it an invaluable tool for developers working on web applications and APIs.
Pros
- Extensive feature set including traffic capture, modification, and simulation
- User-friendly web interface for easy configuration and management
- Supports both HTTP and HTTPS traffic interception
- Highly extensible through plugins and custom rules
Cons
- Steeper learning curve compared to some simpler proxy tools
- Documentation can be challenging for non-Chinese speakers, as some parts are primarily in Chinese
- May require additional setup for HTTPS interception on certain platforms
Getting Started
-
Install Whistle globally using npm:
npm install -g whistle
-
Start Whistle:
w2 start
-
Configure your system or browser to use the Whistle proxy (default:
127.0.0.1:8899
) -
Access the Whistle web interface at
http://localhost:8899/
-
Begin capturing and analyzing traffic by navigating to your target website or application
Competitor Comparisons
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
Pros of mitmproxy
- More powerful and flexible command-line interface
- Better support for scripting and automation
- Stronger focus on security testing and analysis
Cons of mitmproxy
- Steeper learning curve for beginners
- Less user-friendly GUI compared to Whistle
- More complex setup process for certain scenarios
Code Comparison
mitmproxy:
def request(flow):
if flow.request.host == "example.com":
flow.request.headers["User-Agent"] = "Custom User Agent"
Whistle:
/example\.com/ reqHeaders://User-Agent/Custom User Agent/
Key Differences
- mitmproxy is primarily a command-line tool with Python scripting capabilities, while Whistle offers a web-based interface and uses a rule-based system.
- mitmproxy excels in advanced networking scenarios and security testing, whereas Whistle is more accessible for general web debugging and proxying tasks.
- Whistle provides a more intuitive visual interface for managing rules and inspecting traffic, making it easier for non-technical users to get started.
Both tools are powerful in their own right, with mitmproxy offering more advanced features and flexibility, while Whistle provides a more user-friendly experience for common web debugging tasks.
A fully configurable http/https proxy in NodeJS
Pros of AnyProxy
- Simpler setup and configuration process
- Better documentation and examples for beginners
- More lightweight and focused on core proxy functionality
Cons of AnyProxy
- Less feature-rich compared to Whistle
- Limited built-in UI for rule management and debugging
- Fewer advanced features for complex scenarios
Code Comparison
AnyProxy:
module.exports = {
summary: 'a rule to hack response',
*beforeSendResponse(requestDetail, responseDetail) {
if (requestDetail.url.indexOf('example.com') > -1) {
const newResponse = responseDetail.response;
newResponse.body += '-- modified by anyproxy --';
return { response: newResponse };
}
},
};
Whistle:
exports.handleResponseRules = async (ctx) => {
const { fullUrl, headers, body } = ctx.response;
if (fullUrl.indexOf('example.com') > -1) {
ctx.body = body + '-- modified by whistle --';
}
};
Both projects offer proxy functionality with rule-based modifications. AnyProxy provides a more straightforward approach, while Whistle offers more advanced features and a built-in UI for rule management. AnyProxy might be better suited for simpler use cases, whereas Whistle excels in complex scenarios with its extensive plugin system and debugging tools.
A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
Pros of BrowserMob Proxy
- Java-based, integrates well with Selenium WebDriver for automated testing
- Supports HAR (HTTP Archive) file generation for detailed network analysis
- More mature project with longer development history
Cons of BrowserMob Proxy
- Less active development and maintenance compared to Whistle
- Limited built-in features for request/response manipulation
- Steeper learning curve for non-Java developers
Code Comparison
BrowserMob Proxy (Java):
Proxy proxy = new BrowserMobProxyServer();
proxy.start(0);
Selenium driver = new ChromeDriver(proxy.seleniumProxy());
proxy.newHar("test");
driver.get("http://example.com");
Har har = proxy.getHar();
Whistle (JavaScript):
const whistle = require('whistle');
const w2 = new whistle();
w2.start({
port: 8899,
rules: 'example.com forward://127.0.0.1:8080'
});
Both projects serve as HTTP proxies for debugging and testing, but they cater to different ecosystems. BrowserMob Proxy is more focused on Java-based testing environments, while Whistle offers a more flexible, JavaScript-based approach with a wider range of built-in features for request/response manipulation. Whistle has a more active development community and frequent updates, making it potentially more suitable for modern web development workflows.
A fast,scalable,distributed game server framework for Node.js.
Pros of Pomelo
- Designed specifically for game server development, offering scalable and real-time multiplayer game infrastructure
- Supports multiple programming languages (JavaScript, TypeScript, C#) for game logic implementation
- Provides built-in components for common game server features like channel management and session handling
Cons of Pomelo
- Steeper learning curve due to its focus on game server architecture
- Less versatile for general-purpose web development compared to Whistle
- Requires more setup and configuration for non-game related projects
Code Comparison
Whistle (HTTP proxy configuration):
exports.handleRequest = async (ctx) => {
if (ctx.fullUrl.includes('example.com')) {
ctx.response.body = 'Intercepted';
}
};
Pomelo (Game server route definition):
app.route('connector', function(session, msg, app) {
var chatServers = app.getServersByType('chat');
var res = dispatch(chatServers, session.get('rid'));
return res.id;
});
Both projects serve different purposes, with Whistle focusing on HTTP debugging and Pomelo on game server development. Whistle offers a more straightforward approach for web developers, while Pomelo provides specialized tools for building scalable game backends.
A full-featured http proxy for node.js
Pros of node-http-proxy
- Lightweight and focused solely on HTTP proxying
- Easier to integrate into existing Node.js applications
- More flexible for custom proxy implementations
Cons of node-http-proxy
- Limited built-in features compared to Whistle
- Requires more manual configuration for advanced use cases
- Less comprehensive documentation and examples
Code Comparison
node-http-proxy:
const httpProxy = require('http-proxy');
const proxy = httpProxy.createProxyServer({});
proxy.on('proxyReq', function(proxyReq, req, res, options) {
proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');
});
Whistle:
exports.handleRequest = function(req, res) {
req.headers['x-special-proxy-header'] = 'foobar';
return true;
};
Summary
node-http-proxy is a lightweight and flexible HTTP proxy library for Node.js, ideal for developers who need to integrate proxying functionality into their existing applications. It offers more control over the proxying process but requires more manual configuration.
Whistle, on the other hand, is a more comprehensive proxy tool with a wider range of built-in features and a user-friendly interface. It's better suited for debugging and testing scenarios, offering a more complete out-of-the-box solution.
The choice between the two depends on the specific requirements of your project and the level of control you need over the proxying process.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
whistle
Mac æ Windows ç³»ç»æ¨è使ç¨å®¢æ·ç«¯çæ¬ï¼https://github.com/avwo/whistle-client
Whistle æ¯åºäº Node å®ç°ç跨平å°æå è°è¯å·¥å ·ï¼å ¶ä¸»è¦ç¹ç¹ï¼
- **å®å ¨è·¨å¹³å°**ï¼æ¯æ MacãWindows çæ¡é¢ç³»ç»ï¼ä¸æ¯ææå¡ç«¯çå½ä»¤è¡ç³»ç»
- åè½å¼ºå¤§ï¼ç论ä¸å¯ä»¥å¯¹è¯·æ±åä»»æä¿®æ¹ï¼ï¼
- æ¯æä½ä¸º HTTPãHTTPSãSOCKS 代çååå代ç
- æ¯ææå åä¿®æ¹ HTTPãHTTPSãHTTP2ãWebSocketãTCP 请æ±
- æ¯æéæ¾åæé HTTPãHTTPSãHTTP2ãWebSocketãTCP 请æ±
- æ¯æ设置ä¸æ¸¸ä»£çãPAC èæ¬ãHostsã延è¿ï¼ééï¼è¯·æ±ååºç
- æ¯ææ¥çè¿ç¨é¡µé¢ç console æ¥å¿å DOM èç¹
- æ¯æç¨ Node å¼åæ件æ©å±åè½ï¼ä¹å¯ä»¥ä½ä¸ºç¬ç« npm å å¼ç¨
- æä½ç®åï¼
- ç´æ¥éè¿æµè§å¨æ¥çæå ãä¿®æ¹è¯·æ±
- ææä¿®æ¹æä½é½å¯ä»¥éè¿é ç½®æ¹å¼å®ç°ï¼ç±»ä¼¼ç³»ç» Hostsï¼ï¼å¹¶æ¯æåç»ç®¡ç
- 项ç®å¯ä»¥èªå¸¦ä»£çè§åé 置并ä¸é®è®¾ç½®å°æ¬å° Whistle 代çï¼ä¹å¯ä»¥éè¿å®å¶æ件ç®åæä½
ä¸é®å®è£
å·²å®è£
brew
ç PCï¼å¯ä»¥çç¥ä»¥ä¸ 1ã2 æ¥éª¤ï¼ç´æ¥éè¿ä»¥ä¸æ¹å¼ä¸é®å®è£ ï¼brew install whistle && w2 start --init
- å®è£ Nodeï¼å»ºè®®å®è£ **ææ°ç LTS çæ¬**ï¼å¦å·²å®è£ 忽ç¥æ¤æ¥éª¤ï¼ï¼https://nodejs.org/
- ä¸é®å®è£
ï¼å¨å½ä»¤è¡æ§è¡ä»¥ä¸å½ä»¤ï¼
npm i -g whistle && w2 start --init
ä¸è¿°å½ä»¤ä¼å å ¨å±å®è£ Whistle ç npm å åï¼å¯å¨ Whistle 并设置系ç»å ¨å±ä»£çï¼ä»¥åå®è£ ç³»ç»æ ¹è¯ä¹¦ï¼ç®åä¸é®å®è£ åªæ¯æ Mac & Windows ç³»ç»ï¼å ¶å®ç³»ç»æç §ä¸é¢ æå¨å®è£ çæ¹å¼æä½ã
å¦æå®è£ è¿ç¨æ¶æ¥é
Bad CPU type in executable
ï¼å¨å½ä»¤æ§è¡arch -x86_64 zsh
åéæ°æ§è¡ä¸é®å®è£ å½ä»¤ã - ä¸é®å®è£
è¿ç¨ä¸æ³¨æäºé¡¹ï¼
-
Mac éè¦ä¸¤æ¬¡è¾å ¥å¼æºå¯ç ææ纹éªè¯
-
Windows éè¦æåç¹å» âæ¯(Y)â 确认
-
å¦æéè¦èªå®ä¹ä»£çé ç½®ææ ¹è¯ä¹¦ï¼å¦è®¾ç½®å ¶å®ä»£çï¼æ ¹è¯ä¹¦æ代çç½ååçï¼å¯ä»¥éè¿ä»¥ä¸å½ä»¤å®ç°ï¼
w2 proxy
设置系ç»å ¨å±ä»£çï¼https://wproxy.org/whistle/proxy.htmlw2 ca
设置系ç»æ ¹è¯ä¹¦ï¼https://wproxy.org/whistle/proxy.html
ä¹å¯ä»¥ç¨ä¸é¢ æå¨å®è£ æ¹å¼ã
æå¨å®è£
é Mac & Windows ç³»ç»æä¸é®å®è£ 失败å¯ä»¥æä¸é¢æ¹å¼è®¾ç½®ä»£çåå®è£ æ ¹è¯ä¹¦ï¼
- 设置代çï¼https://wproxy.org/whistle/install.html
- å®è£ æ ¹è¯ä¹¦ï¼https://wproxy.org/whistle/webui/https.html
å¿«éä¸æ
å®è£ æååï¼ç¨ Chrome æå¼é¾æ¥ http://local.whistlejs.com å³å¯çå° Whistle çæå é ç½®çé¢ï¼
详ç»ç¨æ³åè§ï¼Whistle 帮å©ææ¡£
éè¿ SwitchyOmega 设置代ç
å®è£ SwitchyOmega
æå¼ Chrome æ©å±ååºè¿è¡å®è£ https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif
é ç½® SwitchyOmega
å ¨å±ä»£çå¦æä¼å½±åå°æäºå®¢æ·ç«¯ç请æ±ï¼å®¢æ·ç«¯è®¾ç½®äº ssl pinningï¼ï¼ä¹å¯ä»¥ä½¿ç¨ Chrome æ件设置代çï¼åªå¯¹ Chrome çæï¼ï¼
å¯ä»¥éè¿
w2 proxy off
å ³éå ¨å±ä»£ç
-
设置 Whistle 代ç
-
éæ© Whistle 代ç
å®å ¨è®¾ç½®
- éè¿å¯å¨åæ°ç»ç®¡ççé¢è®¾ç½®ç¨æ·åå¯ç ï¼
w2 restart -n yourusername -w yourpassword
- éè¿æ件ç»ç»è¿ä»£çç请æ±è®¾ç½®ç¨æ·åå¯ç ï¼https://github.com/whistle-plugins/whistle.proxyauth
License
Top Related Projects
An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers.
A fully configurable http/https proxy in NodeJS
A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
A fast,scalable,distributed game server framework for Node.js.
A full-featured http proxy for node.js
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot