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

glace-proxy

v1.4.0

Published

GlaceJS proxy is interactive nodejs application to launch http and global proxy in order to capture server responses and manage them

Downloads

30

Readme

Build Status | Source Code | Release Notes

GlaceJS Proxy

Annotation

GlaceJS proxy is nodejs interactive console application which launches http and global proxy to capture server responses and manage them.

Features

  • HTTP proxy launching
  • Global transparent proxy launching
  • Responses caching
  • Responses speed management
  • Chrome browser launching
  • Interactive management
  • Development and testing API

Installation

Be sure that you have installed nodejs >= v8.9. Or download and install it.

npm i glacejs-proxy

After installation utility glace-proxy will be available in terminal. Use glace-proxy -h to get details about its usage or see section Console Options.

Installation for development:

git clone https://github.com/schipiga/glacejs-proxy
cd glacejs-proxy
npm i

Quick Start

To start proxy server call the command in terminal:

glace-proxy [options]

Or create file config.json and fill it with content:

{
    "global-proxy": true or false,
    "global-proxy-port": "<port number>",
    "install-certificate": true,
    "existing-cache": true,
    "cache-folder": "</path/to/cache/folder>",
    "url": "<URL>",
    "speed": 128
}

And then just execute command in terminal:

glace-proxy

Console Options

Configuration:

  • -c, --config [config-path] - Path to JSON file with CLI arguments. Default is cwd/config.json (if it exists).
  • --web-url <URL> - Proxied URL for HTTP proxy. Required if HTTP proxy is used.

(Note! All options below are may be used in config.json, see section Quick Start.)

Proxy:

  • --http-proxy - Activate HTTP proxy.
  • --proxy-port [port-number] - Port for HTTP proxy. Default is random. For example: --proxy-port 3000.
  • --global-proxy - Activate transparent global proxy.
  • --global-proxy-port [port-number] - Port for transparent global proxy. Default is random. For example: --global-proxy-port 3001.
  • --install-certificate - Install global proxy certificate as trusted. Requires administrator permissions. Windows only!
  • --speed <value> - Responses speed from proxy to client (browser), kb/s. Default is unlimited. For example: --speed 128.

Cache:

  • --cache - Cache server responses to disk.
  • --existing-cache - Cache server responses to disk. Connect to existing cache if it exists.
  • --cache-folder [folder-path] - Folder to cache server responses. Default is cwd/.proxy-cache. For example: --cache-folder /path/to/my/cache.

Chrome:

  • --chrome - Launch google chrome and open proxied URL there. Pristine profile will be used.
  • --chrome-incognito - Launch google chrome in incognito mode.

Log:

  • --log [file-path] - Path to log file. Default is cwd/glace-proxy.log. For example: --log /path/to/glace-proxy/log.
  • --stdout-log - Print log messages to stdout.

Other:

  • -h, --help - Show help.

GlaceJS Proxy commands

Commands will be available after glace-proxy launching:

  • url <url> - Set proxied URL.
  • proxy start http - Start HTTP proxy.
  • proxy start global - Start global proxy.
  • proxy stop http - Stop HTTP proxy.
  • proxy stop global - Stop global proxy.
  • proxy restart http - Restart HTTP proxy.
  • proxy restart global - Restart global proxy.
  • proxy speed <speed> - Limit proxy speed, kb/s.
  • proxy requests speed <speed> - Limit proxy requests speed, kb/s.
  • proxy responses speed <speed> - Limit proxy responses speed, kb/s.
  • proxy speed reset - Unlimit proxy speed.
  • chrome - Launch google chrome browser. Pristine profile will be used each time.
  • chrome close - Close google chrome browser.
  • chrome restart - Restart google chrome browser. Pristine profile will be used each time.
  • cache - Cache server responses to disk. Cached responses will be replayed by proxy.
  • cache disable - Disable proxy cache.
  • cache clear - Remove cached responses from storage.
  • help [command...] - Provide help for a given command.
  • exit - Exit application.

Development API

var glaceProxy = require("glacejs-proxy");

More details about development and testing API here.

GlaceJS Proxy plugin

As GlaceJS framework plugin it will be loaded automatically.

Plugin CLI

  • --http-proxy - Use http proxy.
  • --http-proxy-port - Port for http proxy. Default is random. Incompatible with --slaves option.
  • --global-proxy - Use transparent global proxy. Chromium browsers only.
  • --global-proxy-port - Port for transparent global proxy. Default is random. Incompatible with --slaves option.
  • --install-certificate - Install global proxy certificate as trusted. Requires administrator permissions.
  • --cache - Enable middleware to cache proxy responses to disk.
  • --existing-cache - Use existing cache if it exists.
  • --reconnect - Number of proxy reconnects on request error. Default is 1.

Plugin API

Test examples

See integration tests in order to explore examples.

Tests and quality

  • Project tests report is here
  • Code coverage report is here