Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

nassau-https-proxy

1.0.2 • Public • Published

Simple HTTPS server for development

This is a simple SSL-stripping reverse proxy for local development. You don’t need to configure your apache or nginx or vagrant or whatever to use SSL. Just complete a simple setup and all of your local projects will be available over HTTPS without browser warnings.

Requirements & Setup

npm install -g nassau-https-proxy

You need to have openssl available on your system, since it’s used to generate certs.

Run proxy

For convenience, proxy listens on the default HTTPS port (443) so it needs to be ran as root:

$ sudo nassau-https-proxy
Listening on 443. Forwarding to http://localhost:80
Add this cert as a trusted root to get rid of SSL warnings: /home/bob/.nassau-proxy/ssl.proxy.nassau.crt

The cert will be added to your system keychain during install, but if something goes wrong, you may always do this manually:

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/.nassau-proxy/ssl.proxy.nassau.crt

Or:

open ~/.nassau-proxy/ssl.proxy.nassau.crt

And set it to "always trust". Google it if you have any problems

Alternate port

If you need to run it on a different port, use PORT env:

env PORT=8443 nassau-https-proxy

Forwarding address

By default it forwards to your local apache/nginx instance. You can change this behaviour using env variables:

env FORWARD_PORT=8080 FORWARD_HOST=vagrant-for-example nassau-https-proxy

Enjoy

After trusting the generated root certificate (ssl.proxy.nassau.crt), your browser will accept any dummy cert generated for your domains by the proxy. Navigate to https://localhost to check the results.

install

npm i nassau-https-proxy

Downloadsweekly downloads

3

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability