### Features

Usage no npm install needed!

<script type="module">
  import vhostProxy from 'https://cdn.skypack.dev/vhost-proxy';


Local Development Proxy

Build Status dependencies Status devDependencies Status License: MIT

Setup virtual hosts and self signed certificates to proxy custom domains to local servers


  • Setup virtual hosts for any domain on local port 80, 443
  • Automatically setup self-signed certificates for SSL/TLS endpoints
  • Authomatically setup local dns resolve domains to local virtual host without having to edit host file
  • Proxy web requests to local port or remote targets
  • Echo web requests
  • Mock REST API using Swagger/OpenAPI specification
  • Serve local files


Usage: vhost-proxy [options] [command]

  -v, --version                         output the version number
  -h, --help                            output usage information

  start|s [options]                     Start
  proxy|p [options] <domain>            Proxy a virtual host
  echo|e [options] <domain>             Start an echo server
  mock|m [options] <domain> <apiSpec>
  delete|d <domain> [domains...]        Remove the virtual host proxy for the domain

Example Usage

# Proxy https://www.testdomain.com to the local server
> vhost-proxy proxy https://www.testdomain.com -p 8080

# Mock REST API at https://api.testdomain.com using swagger spec
> vhost-proxy mock https://api.testdomain.com examples/PetStore.yaml

# Start servers
> vhost-proxy start


This project uses the following libraries