You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

nassau-https-proxy

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nassau-https-proxy

enable HTTPS in your local development environment with automatically generated certificates

1.1.3
latest
Source
npmnpm
Version published
Weekly downloads
135
-72.11%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

local

FAQs

Package last updated on 18 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts