node-web-forward-proxy
v1.0.8
Published
HTTP/HTTPS Proxy through the system proxy
Downloads
7
Readme
node-web-proxy
A HTTP(S) Forward Proxy Cluster built upon nodejs
Requirements
- nodejs v8.x+
- If it's expected to register the HTTP(S) Forward Proxy Cluster as a system service, Windows 7+ is imperative.
- If it's acceptable to start up the HTTP(S) Forward Proxy Cluster in CLI, the Linux is good as well.
- An acceleration client (e.g. Shadowsocks) has been installed in your machine.
- You must be aware of the port number of the acceleration client. As for Shadowsocks, it's 1080 by default.
Characteristics
- In contrast with the Apache/Nginx Proxy module, the HTTP(S) Forward Proxy Cluster is capable of propagating the HTTPS requests.
- The whitelist of the Client IP addresses. Only the enrolled guests are able to enjoy the paid part of the HTTP(S) Forward Proxy Cluster. Conversely, the remaining requests originating from the other tourists are directly delivered to their target web sites and deliberately bypass the acceleration pipe.
- Reference configuration file: ./config/guest-whitelist.json
- GFWlist filter rules. Only the HTTP(S) requests against the inaccessible web sites actually pass through the acceleration pipe, for the sake of the network-flow economy.
- Reference configuration file: ./config/pac-rules.json
Components
The HTTP(S) Forward Proxy is composed of THREE core JS files.
- service-register.js
- Function: Register the HTTP(S) Forward Proxy Cluster as a Windows System Service and start it as well. Since then, the HTTP(S) Forward Proxy Cluster will be always automatically launched, once the Windows OS is started.
- CLI command: web-proxy or web-proxy-serivce
- The JS file is specific to the Windows 7+ OS.
- forward-proxy-cluster.js
- Function: Start up a HTTP(S) Forward Proxy Cluster in Linux-Shell/Windows-CMD CLI.
- CLI command: web-proxy-cluster
- Support multiple OS platforms.
- forward-proxy.js
- Function: Start up a HTTP(S) Forward Proxy in Linux-Shell/Windows-CMD CLI.
- CLI command: web-proxy-single
- Support multiple OS platforms.
Topologies
Installation
- npm -g install node-web-forward-proxy
- web-proxy --service-install
Done. After that,
The HTTP(S) Forward Proxy Cluster is visible in the Service panel.
The HTTP(S) Forward Proxy Cluster is accessible through the URL: http://<your ip address>:5555
The acceleration client listening on the port 1080 is depended on by the HTTP(S) Forward Proxy Cluster. That's to say, the HTTP(S) Forward Proxy Cluster relays some of requests to the acceleration client.
Last but not least, your web browser must be configured to put the HTTP(S) Forward Proxy Cluster to use by delivering the HTTP Connect command to it. See the snapshot:
Usage
usage: web-proxy-serivce [-h] [-v] [-si] [-su] [-st] [-sp] [-sr] [-t]
[-p] [-spp] [-gwl] [-pr]
A HTTP(S) Forward Proxy built upon nodejs
Optional arguments:
-h, --help
Show this help message and exit.
-v, --version
Show program's version number and exit.
-si, --service-install
Install HTTP(S) Proxy as a system service
-su, --service-uninstall
Uninstall HTTP(S) Proxy as a system service
-st, --service-start
Start the system-service HTTP(S) Proxy
-sp, --service-stop
Stop the system-service HTTP(S) Proxy
-sr, --service-restart
Restart the system-service HTTP(S) Proxy
-t, --trace
Trace the proxy logs
-p, --port
The port on which the HTTP(S) Proxy to listens.
(Default: 5555)
-spp, --system-proxy-port
The port number of the system proxy underlying
the HTTP(S) Forward Proxy. (Default: 1080)
-gwl, --guest-whitelist
Only the clients enjoy the paid forward proxy
whose ips are in the whitelist file.
-pr, --pac-rules
Only the web sites the paid forward proxy
whose ips are in the whitelist file.
usage: web-proxy-cluster [-h] [-v] [-p] [-spp]
[-gwl] [-pr]
A HTTP(S) Forward Proxy built upon nodejs
Optional arguments:
-h, --help
Show this help message and exit.
-v, --version
Show program's version number and exit.
-p PORT, --port PORT
The port on which the HTTP(S) Proxy to listens.
(Default: 5555)
-spp, --system-proxy-port
The port number of the system proxy underlying the
HTTP(S) Forward Proxy. (Default: 1080)
-gwl, --guest-whitelist
Only the clients enjoy the paid forward proxy whose
ips are in the whitelist file.
-pr, --pac-rules
Only the web sites the paid forward proxy whose ips
are in the whitelist file.
usage: web-proxy-single [-h] [-v] [-p] [-spp]
[-gwl] [-pr]
A HTTP(S) Forward Proxy built upon nodejs
Optional arguments:
-h, --help
Show this help message and exit.
-v, --version
Show program's version number and exit.
-p PORT, --port PORT
The port on which the HTTP(S) Proxy to listens.
(Default: 5555)
-spp, --system-proxy-port
The port number of the system proxy underlying the
HTTP(S) Forward Proxy. (Default: 1080)
-gwl, --guest-whitelist
Only the clients enjoy the paid forward proxy whose
ips are in the whitelist file.
-pr, --pac-rules
Only the web sites the paid forward proxy whose ips
are in the whitelist file.