A reverse proxy server envolved from redbird

Use revio instead
Last updated 3 years ago by torworx .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install evoxy 
SYNC missed versions from official npm registry.

evoxy Build Status

A reverse proxy server. Evolved from Redbird. With built in Cluster, HTTP2, LetsEncrypt and Docker support


  • Out of the box command-line tool evo with yaml configuratio support (default: /etc/evoxy/evoxy.yml)
  • Challenges http-01 and tls-sni-01 have been tested, and dns-01 should work
  • Wildcard hostname support like www.*.example.com


Support for HTTP2. You can now enable HTTP2 just by setting the HTTP2 flag to true. Keep in mind that HTTP2 requires SSL/TLS certificates. Thankfully we also support LetsEncrypt so this becomes easy as pie.


We have now support for automatic generation of SSL certificates using LetsEncrypt. Zero config setup for your TLS protected services that just works.


  • Flexible and easy routing
  • Websockets
  • Seamless SSL Support (HTTPS -> HTTP proxy)
  • Automatic HTTP to HTTPS redirects
  • Automatic TLS Certificates generation and renewal
  • Load balancer
  • Register and unregister routes programatically without restart (allows zero downtime deployments)
  • Docker support for automatic registration of running containers
  • Cluster support that enables automatic multi-process
  • Based on top of rock-solid node-http-proxy and battle tested on production in many sites
  • Optional logging based on bunyan


Install globally

$ npm i evoxy -g
$ sudo evoxy install

Install locally

$ npm i evoxy


$ npm i evoxy --save



> sudo evo

Config example


  debug: false
  port: 80
    port: 443
    http2: true
    path: '{{base}}/certs'
    port: 9999
    prod: false
    challenge: 'http-01'        # http-01, tls-sni-01, or dns-01
  - example.com:
          email: 'evoxy@example.com'
  - abc.example.com:
  - abc.example.com/media:
  - balance.me:
  - '*':

Programmatical example

evoxy export Server as ReverseProxy in redbird

const Server = require('evoxy').Server;

const server = new Server({port: 80});

// OPTIONAL: Setup your server but disable the X-Forwarded-For header
const server = new Server({port: 80, xfwd: false});

// Route to any global ip
server.register("optimalbits.com", "");

// Route to any local ip, for example from docker containers.
server.register("example.com", "");

// Route from hostnames as well as paths
server.register("example.com/static", "");
server.register("example.com/media", "");

// Subdomains, paths, everything just works as expected
server.register("abc.example.com", "");
server.register("abc.example.com/media", "");

// Route to any href including a target path
server.register("foobar.example.com", "");

// You can also enable load balancing by registering the same hostname with different
// target hosts. The requests will be evenly balanced using a Round-Robin scheme.
server.register("balance.me", "");
server.register("balance.me", "");
server.register("balance.me", "");
server.register("balance.me", "");

// LetsEncrypt support
// With Redbird you can get zero conf and automatic SSL certificates for your domains
server.register('example.com', '', {
  ssl: {
    letsencrypt: {
      email: 'john@example.com', // Domain owner/admin email
      production: true, // WARNING: Only use this flag when the server is verified to work correctly to avoid being banned!

// LetsEncrypt requires a minimal web server for handling the challenges, this is by default on port 3000
// it can be configured when initiating the server. This web server is only used by Redbird internally so most of the time
// you  do not need to do anything special other than avoid having other web services in the same host running
// on the same port.

// HTTP2 Support using LetsEncrypt for the certificates
require('evoxy').server({  // or using `server` creation function
  letsencrypt: {
    path: __dirname + '/certs',
  ssl: {
    http2: true,


The HTTPS proxy supports virtual hosts by using SNI (which most modern browsers support: IE7 and above). The proxying is performed by hostname, so you must use the same SSL certificates for a given hostname independently of its paths.


Some important considerations when using LetsEncrypt. You need to agree to LetsEncrypt terms of service. When using LetsEncrypt, the obtained certificates will be copied to disk to the specified path. Its your responsibility to backup, or save persistently when applicable. Keep in mind that these certificates needs to be handled with care so that they cannot be accessed by malicious users. The certificates will be renewed every 2 months automatically forever.

Docker support

If you use docker, you can tell Redbird to automatically register routes based on image names. You register your image name and then every time a container starts from that image, it gets registered, and unregistered if the container is stopped. If you run more than one container from the same image, Redbird will load balance following a round-robin algorithm:

Programmatical example:

const server = require('evoxy').server({
  port: 8080,

  .register("example.com", 'company/myimage:latest');

Yaml example:

  - example.com: company/myimage:latest

Cluster support

Evoxy support automatic support for node cluster. Just specify in the options object the number of processes that you want Redbird to use. Redbird will automatically re-start any thread that may crash automatically, increasing even more its reliability.

Programmatical example:

const server = new require('evoxy').server({
  port: 8080,
  cluster: 4

Yaml example:

  port: 8080
  cluster: 4

NTLM support


Custom Resolvers







MIT © Yuan Tao

Current Tags

  • 0.2.2                                ...           latest (3 years ago)

8 Versions

  • 0.2.2 [deprecated]           ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (29)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |