Skip to content

compulim/basic-http-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

basic-http-proxy

npm version Node.js dependencies npm downloads

Basic HTTP/S proxy that simply works. Support both HTTP and HTTPS.

Installation

Type npm install basic-http-proxy -g to install.

How to use

There are few ways to use the proxy:

  • Thru command-line interface
  • Thru another Node.js program
  • Run it in Docker

Running it with command-line interface

Type proxy and it will start listening to port 8080.

To configure it to run under port 8888, set environment variable PORT to 8888.

Running it in Node.js

You can also run the proxy inside another Node.js program.

require('basic-http-proxy')({
  port: 8080
});

Running it with Docker

The proxy server can be run under Docker with node:alpine image.

docker build -t proxy .
docker run -d -p 8080:8080 proxy

Configuration

To configure the behavior of the proxy, you can either specify in environment variable, or thru JSON object.

Env var name JSON name Description Default
PORT port Port the server will listen to 8080

Roadmap

Check out this list for planned features.

Contributions

Like us? Star us.

Found a bug? File us an issue.