nassau-https-proxy

1.1.3 • 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

Proxy Timeout

By default, it waits five minutes for a response from the proxied server. You can adjust the timeout using PROXY_TIMEOUT. For example, if you want to adjust the timeout to 10 minutes:

env PROXY_TIMEOUT=600 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.

Package Sidebar

Install

npm i nassau-https-proxy

Weekly Downloads

1,027

Version

1.1.3

License

MIT

Unpacked Size

12.3 kB

Total Files

6

Last publish

Collaborators

  • puck