Setting up a HTTPS proxy with Docker and nginx

Page content

Working with certificates can be tedious. When testing something not related to security, certificates are often just making things more complex and the tests end up trusting all certificates anyway.

For that, and for other reasons, it can be useful to have a proxy that allows you to send http traffic to a https site without having to worry about certificates.

A simple https proxy

The https-proxy Docker image allows you to do that.

Simply specify the https site you want to proxy and on what port.

For instance, this will proxy https://github.com, so that it’s available at http://localhost:80 (assuming you have built the image and named it https-proxy):

docker run --rm -d -p 80:80 -e PROXY_TARGET=https://github.com https-proxy