Show HN: I made a tool to HTTPS your localhost (lokal.so)
It's been 4 month since I work on Lokal full-time, I finally feel confident to share it publicly on YCombinator.
Lokal is a software for Tunneling, Local Development, and HTTP Debugging, It's support HTTP, TCP and UDP Tunnel.
The different with other tunneling solution is that Lokal has mDNS support with https enabled by default, while other might be only offer public-facing tunnel service.
On the latest version 0.3.0, Lokal support Self-hosted Lokal Tunnel Server, which allow you to use your own domain and your own VPS, allow you to have Premium but self-hosted Tunneling Solution.
Download -> Lokal.so/download Self-hosting Tutorial -> https://docs.lokal.so/lokal-server/installation/
54 comments
[ 3.2 ms ] story [ 129 ms ] threadhttps://docs.google.com/spreadsheets/d/1BzvPRA2ZK5ekSaTV5vyr...
basically ngrok's traffic inspection is only available by last month, right, they are old player but pretty late on shipping things.
also, we had an AI Assistant.
Here I made temporary image version (basically screenshotting the google sheet)
https://download.lokal.so/vendor-comparison.png
How does this differ from something like Localcan, which seems to offer the same features? https://www.localcan.com/
For what it's worth, I'll mention that I have an open-source application, Localias [0], that does the same local https development + mDNS support for HTTP/TCP/UDP traffic. Localias doesn't support traffic inspection or remote -> local tunneling, but it's open source, built on caddy, and works on mac/linux/wsl2. It's a statically built binary and you can share your configs with your whole dev team in your git repo.
[0] https://github.com/peterldowns/localias
https://docs.google.com/spreadsheets/d/1BzvPRA2ZK5ekSaTV5vyr...
https://chatgpt.com/share/9cc6ab14-e777-45a6-92b8-c58bbfb433...
[0] https://github.com/FiloSottile/mkcert
For tunneling, how is this different / better than ssh -L?
the second answer is, ssh -L are just pretty slow on concurrent request, I might think it's just bloat as there is so much thing happen on ssh that not required for tunneling, also it doesn't do vhost natively as on Lokal you can just choose which domain you want to use, and it's just works...
https://github.com/legobeat/l7-devenv
Something like Lokal might till be useful here to facilitate remote collaboration by providing a tunnel (ie I can connect to your local session behind NAT without you opening ports or connect to VPNs etc).
Go implementation at the end of article.
- we needed to upgrade all dev servers to serve both HTTPS and HTTP. - we downgraded server to server comms to HTTP (something about invalid cert chain)
I think the ideal solution is to use “local” domain names but that requires a DNS resolver (via Tailscale or similar).
- services exposed via caddy(configured to use my domain on cloudflare for SSL)
- my lan dns resolver(adgaurd home) is configured to rewrite these domains to local IP. Specifically, the rewrite rule looks like `homeassistant.mydomain.com -> rpi.lan`
- Cloudflare tunnel on the rpi for services I want to access outside. I've it configured to require Google auth via cloudflare zero trust(free)
The neat part of this setup is that when I access a service when I'm at home, it works as expected completely locally including https.
If I try to access the service through the public internet, it will still work on the exact same domain and also have proper auth through cloudflare. This way I can access anything on the internet from my home server without worrying about security.
Cloudflare tunnel also offers some other cool things like ssh on your browser(which again uses the previously mentioned Google auth) if you need it.
WATCHTOWER_LABEL_ENABLE env set to true on watchtower
com.centurylinklabs.watchtower.enable label set to true on lokal-server
but I will never get it into launch if all I thinking is to add more features
so currently it's only providing related information of inspected request to the chat session, so our user don't manually copying context again to a chatgpt or similar.
on Macbook, you could check General > Sharing > scroll the bottom and you will see something like RUBIs-MacBook-Pro.local, and it's still working.
It's also confusing to me that the title says HTTPS, the post says HTTP.
The use of HTTPS in the HN post title as a verb makes it incomprehensible for me. Are you planning an HTTPS-basef network attack on the computers of all HN users? Probably not. But then why do you suggest it in the title? Why not write a title which is easy to understand, using common verbs?
basically the title only say 10% of what this software can do, the other feature as visible on Lokal.so site
people might call it ngrok alternative, well it could, but ngrok doesn't have features like Lokal's do
so what's this software basically do is:
Share: your localhost with Public and https .local Address Debug: What's Incoming, Replay without triggering real WebHook Develop: further with AI Assistant help!
if you still don't understand about what this software could do, I'm afraid I'm running out of word to explain this on your-own terms.
appreciate it
I was actually interested in the tool, but closed the page as soon as I saw this.
I don't need any AI from a tool that "gives me HTTPS on localhost". If I need AI Assistant, I know where to go. Thanks.
the AI did not give you https on localhost
the AI only assisting based on your question
I'm trying to record my self talking while operating something on my computer, I give up after 20+ retake, and end up pivoting to this kind of video.
I've been using Cloudflare's thing ("tunnel", I think) for the basic functionality, but I see this does additional things. If I ever want to do those things (or I just decide I want to try something different) I'll keep this in mind.
LAN-Wide Accessible .local address looks like a super useful feature!