Show HN: Local development with .local domains and HTTPS
84 points| jarekceborski | 2 years ago |localcan.com | reply
It also has a reverse proxy that handles HTTPS termination and port forwarding.
I'm working on adding more features, like an index page with all available domains or allowing proxy redirects, so you could redirect from HTTP to HTTPS.
Let me know if you have any questions or feedback!
[+] [-] francislavoie|2 years ago|reply
We don't do anything with mDNS though but we've thought about it; none of us use macs anymore but PRs are welcome to make that work. I don't have enough expertise with mDNS to confidently implement it myself, and especially less-so because the implementation would be different on every OS (needs build flags to change the implementation depending on the build target). And this would be free and open source, rather than this paid product.
[+] [-] qbasic_forever|2 years ago|reply
[+] [-] throwawaymobule|2 years ago|reply
You could probably lean on existing software to do most of the work.
[+] [-] lapcat|2 years ago|reply
The https://news.ycombinator.com/user?id=jarekceborski account was created 1 day ago, the only submission is this one https://news.ycombinator.com/user?id=jarekceborski and the only comments are on this submission https://news.ycombinator.com/threads?id=jarekceborski
[+] [-] nathell|2 years ago|reply
[+] [-] manuelmoreale|2 years ago|reply
Do I personally care? No. Am I bothered by the submission? Also no.
Still, downvoting you doesn't seem all that fair since you do raise a valid point.
[+] [-] ehPReth|2 years ago|reply
[+] [-] 8organicbits|2 years ago|reply
[+] [-] EspressoGPT|2 years ago|reply
Instead, pay $19 (instead of $29!) excl. VAT for a service that does this for you! God damn, I hate this industry.
[+] [-] afavour|2 years ago|reply
Obviously you’re not paying $19 for hosts file editing. Obviously! SSL cert generation is a pain in the ass, a tool that automates all of that for you is a valid tool. And I find the mDNS stuff really interesting, I do a lot of testing on mobile devices and connecting to my dev server from a phone can be really annoying.
If you don’t like the price that’s fine: don’t pay it. The market will decide whether this price is appropriate or not. An independent developer has made a tool that scratches their personal itch and made it available for others to use for a fee. And gets heaped with scorn for it. This place is an absolute cesspit sometimes.
[+] [-] xeckr|2 years ago|reply
$19 is only a couple minutes worth of engineering labour.
This is actually useful if you're running multiple servers on your network and don't want to remember the IPs of every single one of them. And not having to set up HTTPS for every single one of them is a plus.
[+] [-] vladvasiliu|2 years ago|reply
I don't know that I'd buy this if I still had a mac, but I do think that paying for quality of life improvements can be worthwhile. For example, I do pay for a license of IntelliJ idea, even though VSCode costs $0, and I'm not even a full-time software dev.
[+] [-] raincole|2 years ago|reply
Edit: I'm not trying to shame MacOS users. I'm just saying that Linux and MacOS users (Windows users don't use /etc/hosts so out of discussion) have very different behaviour regarding paying for software.
[+] [-] eddieroger|2 years ago|reply
[+] [-] replygirl|2 years ago|reply
[+] [-] hackan|2 years ago|reply
[+] [-] rickette|2 years ago|reply
[+] [-] bsnnkv|2 years ago|reply
[+] [-] 8organicbits|2 years ago|reply
I've been working on getlocalcert[1] which explores this problem from the other end; how can we make TLS certificate management and trust root distribution easier? There's lots of interest in using certificates issued by public CAs for private domains. Especially the free ones from Let's Encrypt. This completely avoids trust root distribution challenges and concerns about trust roots being used to MITM traffic. My local DNS management story is admittedly currently a hand-wave[2], but I really like your approach. I was hoping we could pair our tools, but I think mDNS is for .local only, so we won't be compatible.
I'm curious about the trust root you're using. Lots of tools will create these without any nameConstraints, which is reasonable as client-side support has historically been poor[3], but restricting the root and any intermediaries to *.local can reduce the risk that a stolen trust root is used to MITM unrelated sites like google.com.
[1] https://www.getlocalcert.net/
[2] https://docs.getlocalcert.net/dns/
[3] https://alexsci.com/blog/name-non-constraint/
[+] [-] 8organicbits|2 years ago|reply
[1] https://linux.die.net/man/5/avahi-daemon.conf
[+] [-] kohanz|2 years ago|reply
[+] [-] Alifatisk|2 years ago|reply
[+] [-] thenonameguy|2 years ago|reply
When do you expect to add Linux support? Until then, I'm using a devenv.sh Nix-based setup (without mDNS), with something like this: https://github.com/cachix/devenv/blob/main/examples/mkcert/d...
[+] [-] Zetice|2 years ago|reply
Very clever, if I weren’t leaving the industry I would for sure grab a copy.
[+] [-] j1elo|2 years ago|reply
https://doc-kurento.readthedocs.io/en/latest/knowledge/selfs...
Should probably be a blog post. Would be happy to get comments on improvements or updates to the explained process. For now, I already gathered that Android seems to have finally added mDNS resolution support, which is nice as a whole Note banner can then be removed from that page. I also took note that maybe the whole thing can be simplified greatly with Caddy, albeit I think that getting into explaining mkcert is useful for readers who are new to that stuff and don't know how to generate their own SSL certs (like myself a month before writing all that).
[+] [-] hobofan|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] moondev|2 years ago|reply
bar-192-168-1-1.traefik.me
http://traefik.me/fullchain.pem
http://traefik.me/privkey.pem
[+] [-] lxgr|2 years ago|reply
However, given that allowing private IP resolution from a public DNS subdomain facilitates DNS rebinding attacks, it (and all equivalent approaches) will unfortunately be blocked by quite a few of the more sophisticated home routers out there, including a quite common brand in Germany.
Also, doesn't publishing a privkey for a public TLS certificate theoretically require it to be revoked under common browser CA standards...? Let's Encrypt seems to support it, at least: https://letsencrypt.org/docs/revoking/#using-the-certificate...
[+] [-] mijoharas|2 years ago|reply
I assume that's the case, but want to check I understand correctly.
[+] [-] jarekceborski|2 years ago|reply
[+] [-] emadda|2 years ago|reply
Side note: I released https://tabserve.dev a few months ago.
It uses a browser tab and web workers as a reverse proxy to get a https url to localhost.
[+] [-] capableweb|2 years ago|reply
I'm pretty sure I'm misunderstanding the value-add of having TLS for localhost connections...
[+] [-] mcny|2 years ago|reply
It often feels like the noose is tightening tbh. There are things that contemporary "evergreen" web browsers just flat out refuse to do without https.
I think this is where they document this... https://www.chromium.org/Home/chromium-security/prefer-secur...
which I got from this stack overflow answer https://stackoverflow.com/a/34161385
[+] [-] plorntus|2 years ago|reply
That being said I don't know why you would pay for an application that does this but I guess I'm not the target market.
[+] [-] xcskier56|2 years ago|reply
[+] [-] rascul|2 years ago|reply
.local tld is for the local subnet, not necessarily localhost.
[+] [-] ravenstine|2 years ago|reply
[+] [-] waithuh|2 years ago|reply
[+] [-] agos|2 years ago|reply
[+] [-] drekipus|2 years ago|reply
I can already access "myserverhost.local" from everything but android and OSX. Windows and Linux work fine automatically.
[+] [-] rascul|2 years ago|reply
https://source.android.com/docs/core/ota/modular-system/dns-...
[+] [-] WorldMaker|2 years ago|reply
[+] [-] wiredfool|2 years ago|reply
[+] [-] jasonlotito|2 years ago|reply
I have two devices, but I will never use them at the same time (and if I do by accident, I'd expect your software to stop working).
[+] [-] jarekceborski|2 years ago|reply
[+] [-] waithuh|2 years ago|reply
[+] [-] jareklupinski|2 years ago|reply
been waiting for something like this to come along: when i set up microcontrollers that expose a mini-server, i would like to use the Geolocation API built into mobile browsers so users can tell the gadget where it is, but they block access to the API unless your site starts with 'https://' ( a silly barrier but whatever )
[+] [-] pratio|2 years ago|reply
https://github.com/FiloSottile/mkcert
[+] [-] AlexJuca|2 years ago|reply
Congrats on releasing the tool.