node-web-forward-proxy

1.0.8 • Public • Published

node-web-proxy

A HTTP(S) Forward Proxy Cluster built upon nodejs

Requirements

  1. nodejs v8.x+
  2. If it's expected to register the HTTP(S) Forward Proxy Cluster as a system service, Windows 7+ is imperative.
  3. If it's acceptable to start up the HTTP(S) Forward Proxy Cluster in CLI, the Linux is good as well.
  4. An acceleration client (e.g. Shadowsocks) has been installed in your machine.
  5. You must be aware of the port number of the acceleration client. As for Shadowsocks, it's 1080 by default.

Characteristics

  1. In contrast with the Apache/Nginx Proxy module, the HTTP(S) Forward Proxy Cluster is capable of propagating the HTTPS requests.
  2. 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
  3. 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.

  1. 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.
  2. 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.
  3. 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

  1. npm -g install node-web-forward-proxy
  2. web-proxy --service-install

Done. After that,

  1. The HTTP(S) Forward Proxy Cluster is visible in the Service panel.

  2. The HTTP(S) Forward Proxy Cluster is accessible through the URL: http://<your ip address>:5555

  3. 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.

  4. 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.

Readme

Keywords

Package Sidebar

Install

npm i node-web-forward-proxy

Weekly Downloads

0

Version

1.0.8

License

ISC

Unpacked Size

196 kB

Total Files

21

Last publish

Collaborators

  • stuart_zhang