Live data from Hacker News

Show HN: Local development with .local domains and HTTPS

localcan.com

51–60 of 108 posts

Re: Show HN: Local development with .local domains and HTTPS

#51

You can do this with Caddy already, with Automatic HTTPS. Caddy will automatically set up its own CA and use it to issue certs (using smallstep) with .local and .localhost domains. 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…

On modern systemd-based Linux systems that use its systemd-resolved DNS resolver it automatically forwards all *.localhost traffic to your local host. It works great with caddy for local development and testing of services.

Re: Show HN: Local development with .local domains and HTTPS

#52

> Forget editing /etc/hosts or typing 192.168.0.12! Instead, pay $19 (instead of $29!) excl. VAT for a service that does this for you! God damn, I hate this industry.

Well, it does a little more than that. You can type yourservice.local instead of 192.168.0.12:1234. 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.

I do have a MacBook and I do have a JetBrains All-Products license, yet I'm not going to pay for a service that does something existing tools can do for free today (see Puma, Caddy etc.) – and that $19 isn't even a one-time purchase since you'll only get updates for a year.

Re: Show HN: Local development with .local domains and HTTPS

#53
post #4

Is this something like how ".local" is already a mDNS standard but OSX and android won't support it yet? (Unless they buy your app) I can already access "myserverhost.local" from everything but android and OSX. Windows and Linux work fine automatically.

It’s been on osx since it saw called osx and not MacOS.

Re: Show HN: Local development with .local domains and HTTPS

#57

You can do this with Caddy already, with Automatic HTTPS. Caddy will automatically set up its own CA and use it to issue certs (using smallstep) with .local and .localhost domains. 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…

On modern systemd-based Linux systems that use its systemd-resolved DNS resolver it automatically forwards all *.localhost traffic to your local host. It works great with caddy for local development and testing of services.

Yep! And some browsers now hard-coded resolve *.localhost to ::1 by default, so you often don't need any resolver at all. See https://dev.to/k4ml/firefox-and-chrome-resolve-any-localhost...

Re: Show HN: Local development with .local domains and HTTPS

#58
post #46

This submission violates the HN guidelines: "Please don't use HN primarily for promotion. It's ok to post your own stuff part of the time, but the primary use of the site should be for curiosity." https://news.ycombinator.com/newsguidelines.html 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 t…

I’d give the OP the benefit of doubt. I’ve always read that rule as discouraging excessive self-promotion, not a ban on one-off ones, and I think that should apply even when that one-off happens to be the very first submission by the account in question.

Re: Show HN: Local development with .local domains and HTTPS

#59

> Forget editing /etc/hosts or typing 192.168.0.12! Instead, pay $19 (instead of $29!) excl. VAT for a service that does this for you! God damn, I hate this industry.

Well, it does a little more than that. You can type yourservice.local instead of 192.168.0.12:1234. 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.

Sure, but there are also excellent FOSS solutions for this, such as https://github.com/peterldowns/localias which has the benefit of being cross-platform.

Re: Show HN: Local development with .local domains and HTTPS

#60
post #55

foo-192-168-1-1.traefik.me bar-192-168-1-1.traefik.me http://traefik.me/fullchain.pem http://traefik.me/privkey.pem

This is neat!

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

Post reply on HN