Settings

Theme

Show HN: Simplify testing HTTPS locally with any port proxing

github.com

1 points by joseph2024 2 years ago · 1 comment

Reader

joseph2024OP 2 years ago

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/.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection