TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Local development with .local domains and HTTPS

84 点作者 jarekceborski将近 2 年前
Hi HN! I&#x27;m Jarek, and I&#x27;ve built this tool that allows publishing .local domains on the local network using mDNS.<p>It also has a reverse proxy that handles HTTPS termination and port forwarding.<p>I&#x27;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.<p>Let me know if you have any questions or feedback!

28 条评论

francislavoie将近 2 年前
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.<p>We don&#x27;t do anything with mDNS though but we&#x27;ve thought about it; none of us use macs anymore but PRs are welcome to make that work. I don&#x27;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.
评论 #36955784 未加载
评论 #36955707 未加载
lapcat将近 2 年前
This submission violates the HN guidelines: &quot;Please don&#x27;t use HN primarily for promotion. It&#x27;s ok to post your own stuff part of the time, but the primary use of the site should be for curiosity.&quot; <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;newsguidelines.html</a><p>The <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=jarekceborski">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=jarekceborski</a> account was created 1 day ago, the only submission is this one <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=jarekceborski">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;user?id=jarekceborski</a> and the only comments are on this submission <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;threads?id=jarekceborski">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;threads?id=jarekceborski</a>
评论 #36955847 未加载
评论 #36957268 未加载
评论 #36959099 未加载
评论 #36966943 未加载
EspressoGPT将近 2 年前
&gt; Forget editing &#x2F;etc&#x2F;hosts or typing 192.168.0.12!<p>Instead, pay $19 (instead of $29!) excl. VAT for a service that does this for you! God damn, I hate this industry.
评论 #36955718 未加载
评论 #36955701 未加载
评论 #36955745 未加载
评论 #36955634 未加载
评论 #36955660 未加载
评论 #36955724 未加载
评论 #36955810 未加载
rickette将近 2 年前
Can recommend <a href="https:&#x2F;&#x2F;github.com&#x2F;FiloSottile&#x2F;mkcert">https:&#x2F;&#x2F;github.com&#x2F;FiloSottile&#x2F;mkcert</a> for this purpose (local development certs).
评论 #36955536 未加载
8organicbits将近 2 年前
Great work! Public CAs have done a wonderful job making HTTPS easy for public websites, but private networks feel under-supported and we&#x27;re often stuck with legacy tools. I&#x27;m really happy to see people building here.<p>I&#x27;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&#x27;s lots of interest in using certificates issued by public CAs for private domains. Especially the free ones from Let&#x27;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&#x27;t be compatible.<p>I&#x27;m curious about the trust root you&#x27;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 <i>and</i> any intermediaries to *.local can reduce the risk that a stolen trust root is used to MITM unrelated sites like google.com.<p>[1] <a href="https:&#x2F;&#x2F;www.getlocalcert.net&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.getlocalcert.net&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;docs.getlocalcert.net&#x2F;dns&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;docs.getlocalcert.net&#x2F;dns&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;alexsci.com&#x2F;blog&#x2F;name-non-constraint&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;alexsci.com&#x2F;blog&#x2F;name-non-constraint&#x2F;</a>
评论 #36956906 未加载
kohanz将近 2 年前
We use puma-dev for this <a href="https:&#x2F;&#x2F;github.com&#x2F;puma&#x2F;puma-dev">https:&#x2F;&#x2F;github.com&#x2F;puma&#x2F;puma-dev</a>
评论 #36956338 未加载
thenonameguy将近 2 年前
This looks really great!<p>When do you expect to add Linux support? Until then, I&#x27;m using a devenv.sh Nix-based setup (without mDNS), with something like this: <a href="https:&#x2F;&#x2F;github.com&#x2F;cachix&#x2F;devenv&#x2F;blob&#x2F;main&#x2F;examples&#x2F;mkcert&#x2F;devenv.nix">https:&#x2F;&#x2F;github.com&#x2F;cachix&#x2F;devenv&#x2F;blob&#x2F;main&#x2F;examples&#x2F;mkcert&#x2F;d...</a>
Zetice将近 2 年前
You know you’re onto something when you get HN comments that say, “this can easily be done by just &lt;list half a dozen tools and processes&gt;”…<p>Very clever, if I weren’t leaving the industry I would for sure grab a copy.
j1elo将近 2 年前
This is my poor man&#x27;s, do-it-yourself, LAN development with HTTPS method:<p><a href="https:&#x2F;&#x2F;doc-kurento.readthedocs.io&#x2F;en&#x2F;latest&#x2F;knowledge&#x2F;selfsigned_certs.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;doc-kurento.readthedocs.io&#x2F;en&#x2F;latest&#x2F;knowledge&#x2F;selfs...</a><p>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 <i>Note</i> 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 <i>mkcert</i> is useful for readers who are new to that stuff and don&#x27;t know how to generate their own SSL certs (like myself a month before writing all that).
hobofan将近 2 年前
Or you could just use Tailscale with their Tunnel feature, and you get most of those things with their free tier (up to 3 users with up to 100 devices) and at a cheaper per-user pricing after that. And it also works cross-platform.
评论 #36955825 未加载
moondev将近 2 年前
foo-192-168-1-1.traefik.me<p>bar-192-168-1-1.traefik.me<p><a href="http:&#x2F;&#x2F;traefik.me&#x2F;fullchain.pem" rel="nofollow noreferrer">http:&#x2F;&#x2F;traefik.me&#x2F;fullchain.pem</a><p><a href="http:&#x2F;&#x2F;traefik.me&#x2F;privkey.pem" rel="nofollow noreferrer">http:&#x2F;&#x2F;traefik.me&#x2F;privkey.pem</a>
评论 #36955865 未加载
评论 #36955962 未加载
mijoharas将近 2 年前
Regarding the certs. Does this do something special to trust the self-signed root certificate that you add? or do you need to manually trust it on any device that you use to connect to this?<p>I assume that&#x27;s the case, but want to check I understand correctly.
评论 #36955715 未加载
emadda将近 2 年前
Looks very nice.<p>Side note: I released <a href="https:&#x2F;&#x2F;tabserve.dev" rel="nofollow noreferrer">https:&#x2F;&#x2F;tabserve.dev</a> a few months ago.<p>It uses a browser tab and web workers as a reverse proxy to get a https url to localhost.
capableweb将近 2 年前
Looks like an interesting project. What I guess is not really clear is why you&#x27;d want to do TLS for local only connections? Are the services published with the .local domain accessible from outside as well so it&#x27;s like a ngrok alternative?<p>I&#x27;m pretty sure I&#x27;m misunderstanding the value-add of having TLS for localhost connections...
评论 #36955456 未加载
评论 #36955455 未加载
评论 #36955480 未加载
评论 #36955550 未加载
评论 #36955659 未加载
评论 #36955474 未加载
评论 #36955466 未加载
drekipus将近 2 年前
Is this something like how &quot;.local&quot; is already a mDNS standard but OSX and android won&#x27;t support it yet? (Unless they buy your app)<p>I can already access &quot;myserverhost.local&quot; from everything but android and OSX. Windows and Linux work fine automatically.
评论 #36955560 未加载
评论 #36957600 未加载
评论 #36955807 未加载
jasonlotito将近 2 年前
I&#x27;m curious about the license requirements. Is it 1 license per install, or 1 per install that is currently serving?<p>I have two devices, but I will never use them at the same time (and if I do by accident, I&#x27;d expect your software to stop working).
评论 #36955664 未加载
waithuh将近 2 年前
Risky target audience. Maybe useful for people that hop networks regularly.
jareklupinski将近 2 年前
had a mini-heart attack reading the intro; we don&#x27;t see enough of each others&#x27; names on here :)<p>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 &#x27;<a href="https:&#x2F;&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;</a>&#x27; ( a silly barrier but whatever )
pratio将近 2 年前
We use mkcert for this, it works wonderfully.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;FiloSottile&#x2F;mkcert">https:&#x2F;&#x2F;github.com&#x2F;FiloSottile&#x2F;mkcert</a>
AlexJuca将近 2 年前
Very cool tool! This can be done using other means but I like how easy it is with this tool and the app has a decent looking UI.<p>Congrats on releasing the tool.
blacklight将近 2 年前
&quot;Forget editing &#x2F;etc&#x2F;hosts!&quot;<p>Right.<p>Why would you edit a local file (or create a record on your own local DNS), generate your own self-signed certificate, and immediately get a website that can be tested on your machine, on your local network or on your VPN, when you can pay someone $19 per device (MacOS only) for something less powerful?<p>I understand that everybody needs to make money for a living, but this seems like the digital equivalent of bottling tap water and asking people to pay for it.
评论 #36963118 未加载
mkl95将近 2 年前
Isn&#x27;t that just a sidecar? Maybe Kubernetes is hard enough that some engineers are willing to pay $19 to avoid using it.
a_imho将近 2 年前
<i>Forget editing &#x2F;etc&#x2F;hosts</i><p>Why?
评论 #36955663 未加载
评论 #36955762 未加载
manuelfcreis将近 2 年前
Really like what this does and the look of it! Congrats
评论 #36955248 未加载
rado将近 2 年前
Interesting. Does it have gzip and HTTP&#x2F;2? Thanks
评论 #36959184 未加载
redder23将近 2 年前
I feels this is something that should NOT be a payable service at all. I am sure its not rocket science, not even Linux support?<p>Probably some open source tools for this to set it up your self for free.
评论 #36955603 未加载
mdev23将近 2 年前
is it secure?
Thoeu388将近 2 年前
Lets introduce proprietary service with a payment plan. That will simplify things LOL.<p>Just switch to Linux and you will never ever had to deal with this weird stuff agian!
评论 #36955779 未加载