A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.
Home page : AnyProxy.io
(Chinese in this doc is nothing but translation of some key points. Be relax if you dont understand.)
npm install -g anyproxy, may require
anyproxy --port 8001
anyproxy --rule ./rule_sample/rule_allow_CORS.js
Rule module is the specialty for AnyProxy. Think it as a middleware, you could write your own code to hack requests at any stage, no matter it is about to response or the proxy just gets the request. In this way, AnyProxy would be flexible to meet your own demands.
It's highly recommended to read this guide before using: What is rule file and how to write one ?
After configuring rootCA, AnyProxy could help to decrypt https requests, whose approach is also called Man-In-The-Middle(MITM).
A guide about configuring https features is here : https://github.com/alibaba/anyproxy/wiki/How-to-config-https-proxy
anyproxy --file /path/to/file
anyproxy --throttle 10sets the speed limit to 10kb/s (kbyte/sec)
npm install anyproxy --save
var proxy = ;//create cert when you want to use https features//please manually trust this rootCA when it is the first time you run it!proxy && proxy;var options =type : "http"port : 8001hostname : "localhost"rule :dbFile : null // optional, save request data to a specified file, will use in-memory db if not specifiedwebPort : 8002 // optional, port for web interfacesocketPort : 8003 // optional, internal port for web socket, replace this when it is conflict with your own servicethrottle : 10 // optional, speed limit in kb/sdisableWebInterface : false //optional, set it when you don't want to use the web interfacesetAsGlobalProxy : false //set anyproxy as your system proxysilent : false //optional, do not print anything into terminal. do not set it when you are still debugging.;options;