https://github.com/mdp/gloss
Super simple HTTPS reverse proxy written in Go
https://github.com/mdp/gloss
Last synced: about 1 year ago
JSON representation
Super simple HTTPS reverse proxy written in Go
- Host: GitHub
- URL: https://github.com/mdp/gloss
- Owner: mdp
- License: mit
- Created: 2015-09-16T21:27:33.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-15T19:18:43.000Z (over 7 years ago)
- Last Synced: 2025-03-24T20:43:00.281Z (about 1 year ago)
- Language: Go
- Size: 21.5 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# GLoSS (Go SSL)
GLoSS is a very simple HTTPS reverse proxy that allows you to easily develop and test on HTTPS locally
## Why
Your production is on HTTPS, stop developing on HTTP!
Highlights:
- No dependencies. Just one self-contained single executable
- Works on a variety of platforms and architectures: Mac, Linux - Arm7(Raspi2)/Arm6(Raspi)/Amd64/386
- Passes the same headers you'd expect with any other reverse proxy ssl
- "X-Forwarded-Proto": "https"
- "X-Forwarded-For": "the.clients.real.ip"
- Doesn't require trusting a CA cert, only valid signing for the hosts you specify (default: *.local.dev)
## Downloads
[Grab the latest release for your platform](https://github.com/mdp/gloss/releases)
## Usage
1. Pick a hostname for your local development
- `echo "127.0.0.1 local.dev" | sudo tee -a /etc/hosts > /dev/null`
- `echo "127.0.0.1 foo.local.dev" | sudo tee -a /etc/hosts > /dev/null`
1. Create a certificate
- `gloss setup`
1. Import the certificate to your keychain (Mac specific instructions below)
- `open ~/.gloss/cert.pem`
- Find the GLoSS cert and make it "Trusted"
1. Start using GLoSS
- `gloss --map "*:3000,foo:4000"` Maps foo.local.dev to port 4000, everything else to 3000
1. Visit https://foo.local.dev:4443
- Will return the content at localhost:4000 via HTTPS
Or just run `gloss -h` for more help
### Setup redirection of port 443 -> 4443
*Mac* (El Capitan and Yosemite)
echo "rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 4443" | sudo pfctl -ef -
*Windows*
netsh interface portproxy add v4tov4 connectport=4443 listenport=443 connectaddress=127.0.0.1 listenaddress=127.0.0.1
*Linux*
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 4443
## Build from source
`go get github.com/mdp/gloss`
### License: MIT