5 ms·
Show HN: Simplify testing HTTPS locally with any port proxing
- joseph2024 2y agoI 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 https://{PORT}.{IP}.sslip.io` requests to their `http://{IP}:{PORT} 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/ https://{PORT}.{IP}.sslip.io:5443/ which proxies to http://{IP}:{PORT}/ http://{IP}:{PORT}/. For example: https://5173.127-0-0-1.sslip.io:5443/ https://5173.127-0-0-1.sslip.io:5443/ proxies to http://127.0.0.1:5173/ http://127.0.0.1:5173/.