http-proxies

0.1.2-beta.3 • Public • Published

http-proxies

HTTP-pROXies logo

Simple configurable http proxy server

Build Status

Example

npx http-proxies -c conf.json

conf.json

[
  {
    "context": ["/google"],
    "target": "https://www.google.com",
    "secure": false,
    "autoRewrite": true,
    "pathRewrite": {
      "^/google": "/"
    },
    "rewriteHeaders": {
      "Host": "example.com"
    },
    "cookieDomainRewrite": { "*": "" }
  },
  {
    "context": ["/v1/app1"],
    "target": "http://localhost:1234",
    "secure": false,
    "pathRewrite": {
      "^/v1/app1": "/app1"
    }
  },
  {
    "context": ["/app2"],
    "target": "http://localhost:4001",
    "secure": false,
    "changeOrigin": true,
    "enforceAutoRewrite": true
  }
]
 

Help

  Usage: index [options]
 
  Options:
 
    -V, --version      output the version number
    -c, --conf <path>  Config file defaults to ./proxies-conf.json
    -p, --port [path]  Http proxy server port. Default to 8080
    -l, --logs         With access log
    -s, --secure       With SSL (Auto generated self signed certificate)
    -m, --managment    Enable managment
    -h, --help         output usage information
  Examples:
 
    $ http-proxies --help
    $ http-proxies -c your-proxies-conf.json
    $ http-proxies -c your-proxies-conf.json -lsm

Management UI

Start with the -m option an go to http(s)://localhost:_your_proxy_port/management And you'll get this beautiful management UI

Management UI screen

Readme

Keywords

none

Package Sidebar

Install

npm i http-proxies

Weekly Downloads

0

Version

0.1.2-beta.3

License

ISC

Unpacked Size

1.51 MB

Total Files

36

Last publish

Collaborators

  • kepennar