npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-web-forward-proxy

v1.0.8

Published

HTTP/HTTPS Proxy through the system proxy

Downloads

4

Readme

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.