• Stars
    star
    727
  • Rank 62,329 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ”’ Simple zero-config SSL reverse proxy with real autogenerated certificates (LetsEncrypt, self-signed, provided)

ssl-proxy

Simple single-command SSL reverse proxy with autogenerated certificates (LetsEncrypt, self-signed)

A handy and simple way to add SSL to your thing running on a VM--be it your personal jupyter notebook or your team jenkins instance. ssl-proxy autogenerates SSL certs and proxies HTTPS traffic to an existing HTTP server in a single command.

Usage

With auto self-signed certificates

ssl-proxy -from 0.0.0.0:4430 -to 127.0.0.1:8000

This will immediately generate self-signed certificates and begin proxying HTTPS traffic from https://0.0.0.0:4430 to http://127.0.0.1:8000. No need to ever call openssl. It will print the SHA256 fingerprint of the cert being used for you to perform manual certificate verification in the browser if you would like (before you "trust" the cert).

I know nginx is often used for stuff like this, but I got tired of dealing with the boilerplate and wanted to explore something fun. So I ended up throwing this together.

With auto LetsEncrypt SSL certificates

ssl-proxy -from 0.0.0.0:443 -to 127.0.0.1:8000 -domain=mydomain.com

This will immediately generate, fetch, and serve real LetsEncrypt certificates for mydomain.com and begin proxying HTTPS traffic from https://0.0.0.0:443 to http://127.0.0.1:8000. For now, you need to ensure that ssl-proxy can bind port :443 and that mydomain.com routes to the server running ssl-proxy (as you may have expected, this is not the tool you should be using if you have load-balancing over multiple servers or other deployment configurations).

Provide your own certs

ssl-proxy -cert cert.pem -key myKey.pem -from 0.0.0.0:4430 -to 127.0.0.1:8000

You can provide your own existing certs, of course. Jenkins still has issues serving the fullchain certs from letsencrypt properly, so this tool has come in handy for me there.

Redirect HTTP -> HTTPS

Simply include the -redirectHTTP flag when running the program.

Installation

Simply download and uncompress the proper prebuilt binary for your system from the releases tab. Then, add the binary to your path or start using it locally (./ssl-proxy).

If you're using wget, you can fetch and uncompress the right binary for your OS using getbin.io as follows:

wget -qO- "https://getbin.io/suyashkumar/ssl-proxy" | tar xvz 

or with curl (note you need to provide your os if using curl as one of (darwin, windows, linux) below):

curl -LJ "https://getbin.io/suyashkumar/ssl-proxy?os=linux" | tar xvz 

Shameless plug: suyashkumar/getbin (https://getbin.io) is a general tool that can fetch the latest binaries from GitHub releases for your OS. Check it out :).

Build from source

Build from source using Docker

You can build ssl-proxy for all platforms quickly using the included Docker configurations.

If you have docker-compose installed:

docker-compose -f docker-compose.build.yml up

will build linux, osx, and darwin binaries (x86) and place them in a build/ folder in your current working directory.

Build from source locally

You must have Golang installed on your system along with make and dep. Then simply clone the repository and run make.

Attribution

Icons made by Those Icons from www.flaticon.com is licensed by CC 3.0 BY

More Repositories

1

dicom

⚑High Performance DICOM Medical Image Parser in Go.
Go
928
star
2

seven-segment-ocr

Digitizes numbers from videos & images of seven segment displays
Python
69
star
3

getbin

πŸ’» Easily fetch latest GitHub release binaries (for your OS/arch) using just wget or curl
Go
64
star
4

conduit

☁ Securely call firmware functions from the cloud.
Go
37
star
5

smart-lights

Cloud-Controlled house lights using home-grown electronics and 3D printed light switch covers
Swift
20
star
6

jenkins-ssl-docker

Jenkins container with SSL and docker
Shell
8
star
7

go-starter

A Golang starter web service with RESTful API, SSL, and static frontend serving
Go
6
star
8

OpenSpirometer

Bluetooth Spirometer records data on cloud-connected Android app, helps measure lung function and respiratory triggers
Java
5
star
9

heart_rate_databases_starter

Starter codebase for BME590 Databases Assignment
Python
5
star
10

auth

A simple Golang authentication library with batteries included (hashing, permissions, validation, etc)
Go
5
star
11

bme590_melanoma_detection

[In Progress] Starter repository for BME590 Medical Software Design Final Projects
Jupyter Notebook
4
star
12

CloudPulse

A cloud based pulse device and platform--electronics, firmware, server, frontend.
CSS
4
star
13

fgen_interface

Control the Agilent 33522A function generator over USB, some Oscilloscope functions now too!
Python
4
star
14

bike

🚴Capture & Save RPM derived data from my Exercise Bike
C++
3
star
15

bbb_adc

Beaglebone Black High-Speed ADC
C
3
star
16

scad_modules

Useful OpenSCAD Modules
OpenSCAD
3
star
17

ResistorColorCode

A simple Apple Watch Resistor Color Code Resolver
Swift
3
star
18

CloudRelay

A cloud-controlled physical relay with iOS, Apple Watch, and Web control applications
Swift
2
star
19

conduit-firmware-library

Use magical RESTful APIs from a central server to communicate to/from the ESP8266 chip with ease
C++
2
star
20

CloudADC

High-speed (1.8 MHz) BeagleBone Cloud ADC
C
2
star
21

deeplesion-gcp-loader

Get the DeepLesion CT Image data set into a GCP Storage Bucket
Go
2
star
22

filter

Easily filter an arbitrary slice of structs based on certain configurable criteria determined at runtime
Go
2
star
23

docker-vtk-itk

ITK, VTK, and Jupyter container for a Kitware Seminar
Jupyter Notebook
1
star
24

icestorm-docker

Dockerized open-source toolchain for Lattica FPGAs
1
star
25

CO2

Explorations/learnings building a CO2 monitoring device for fun.
Jupyter Notebook
1
star
26

particle-logger

Simple tool to log and record Particle Publishes to either MongoDB (exposed via RESTful API) or CSV
JavaScript
1
star
27

sponge_holder

Parametric 3D Model for a simple sink sponge holder
OpenSCAD
1
star
28

auth-grpc

Authentication gRPC microservice with batteries included (db, hashing, validation, etc)
Go
1
star
29

matrix_to_scad

3D Rendering of Matricies via generated OpenSCAD
Python
1
star
30

conduit-frontend

The frontend for the Conduit service, a central web service used to easily interface with IoT (ESP8266, etc)
JavaScript
1
star
31

bump-explore

A web application to allow bumper pool players to explore their data
HTML
1
star
32

bme590_frontend_starter

Starter repository for BME590 Final Projects (Frontend)
JavaScript
1
star
33

provision

Provisions Ubuntu 14+ servers as I like them for deployment
Shell
1
star