Skip to content
A proxy that upgrades HTTP connections to HTTPS for systems which cannot make HTTPS requests.
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Nov 3, 2019
LICENSE Initial commit Nov 3, 2019
README.md change to path and url Dec 11, 2019
http-to-https-proxy.go show EOF is reached. That is not an error Dec 28, 2019

README.md

http-to-https-proxy

A proxy that upgrades HTTP connections to HTTPS for systems which cannot make HTTPS requests.

Running the proxy

Default Configuration

./http-to-https-proxy 
2019/11/03 22:54:50 Starting HTTP to HTTPS proxy listening to 80, forward to 443 with listening buffer 5000
2019/11/03 22:54:50 You can supply the listening and forwarding port and buffer size as 3 command line arguments
2019/11/03 22:54:51 Received request to route to host ABC.com and url /api/endpoint
2019/11/03 22:54:52 End of handler
...

By default, proxy will listen to HTTP requests on port 80 and retransmit HTTPS via port 443. Buffer size of 4096 is the buffer to receive destination server's response chunks before forwarding back original client.

Modify ports and buffer size

go run http-to-https-proxy.go 90 445 5000
2019/11/03 22:56:05 Starting HTTP to HTTPS proxy listening to 90, forward to 445 with listening buffer 5000
2019/11/03 22:56:05 You can supply the listening and forwarding port and buffer size as 3 command line arguments
...

All 3 arguments must be specified even if you only wish to change one of the values.

Compiling

Just install the latest Go compiler for your platform. The latest at the time of writing is 1.13.4.

brew install go
go build -v
You can’t perform that action at this time.