1 comment

[ 1.8 ms ] story [ 15.7 ms ] thread
I built a tool called local-tls-proxy, which allows easy setup of HTTPS for local testing. It works by proxying all `https://{PORT}.{IP}.sslip.io` requests to their `http://{IP}:{PORT}` counterparts.

It's especially useful for testing in secure contexts in browsers. The tool automatically generates and installs CA certificates, making it convenient for developers on both Linux and Windows.

---

Usage:

1. Install CA certificate

For Linux: $ sudo ./local-tls-proxy -install

For Windows (administrator mode): > local-tls-proxy.exe -install

2. Run the proxy $ ./local-tls-proxy -port 5443

3. Now, access via https://{PORT}.{IP}.sslip.io:5443/ which proxies to http://{IP}:{PORT}/.

For example: https://5173.127-0-0-1.sslip.io:5443/ proxies to http://127.0.0.1:5173/.