Live data from Hacker News

Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

github.com

31–38 of 38 posts

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#32

Earlier quoted context omitted.

very very fair. mDNS is just the method of communicating what traffic should be sent where. The "switchboard" listens for mDNS broadcasts that tell it what services want traffic routed to them under what conditions. A "node" (which was a bad choice of words) is the other side of that, a program broadcasting one of those mDNS resources (e.g. send traffic that's been sent to the domain "example.test" to this machine on…

How does it work with LetsEncrypt? I always thought you need to be public in order to get valid SSL certs. How does LetsEncrypt work with mDNS?

mDNS would be used for the internal network to discover hosts. The proxy server would terminate SSL using a LetsEncrypt certificate before forwarding traffic to one of the internal nodes (discovered via mDNS).

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#33
I’m actually looking for something that does the mDNS registration for multiple back-end services (I did https://github.com/piku/avahi-aliases for announcing mDNS hostnames, which will go along nicely with this, but wanted an all-in-one or a Traefik/Caddy plugin that would do the registration itself).

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#34
I have about 70 devices and services at home (pure software services such as a web app, up to WiFi-connected IoT).

I manage everything via dnsmasq on my router, and I use a DNS wildcard to make sure that all unknown IPs map to my server.

This is because the server holds the docker engine on whihc all "software services" are located. I did a few bounces between Traefik and Caddy over the years and finally settled on Caddy.

Caddy is a truly fantastic web server. If you manually forced IPs on your containers there is not problem at all (2 lines per service). If you did not, there is unfortunately no built-in mechanism in Caddy to autodiscover them (such as the one in Traefik). I wrote my own using the new Caddy API (v2).

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#35

Cloudflare Argo Tunnel is awesome, though it requires Argo which is $5 a month. https://developers.cloudflare.com/argo-tunnel/ Run a simple command locally, and have a https server endpoint connected to anything on your machine.

My favorite is ngrok. Great developer and well documented product that I even rely on for production.

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#36
post #33

I’m actually looking for something that does the mDNS registration for multiple back-end services (I did https://github.com/piku/avahi-aliases for announcing mDNS hostnames, which will go along nicely with this, but wanted an all-in-one or a Traefik/Caddy plugin that would do the registration itself).

Would you be willing to make a Caddy plugin for it? Here's how: https://caddyserver.com/docs/extending-caddy

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#37
post #30
post #29

Earlier quoted context omitted.

That seems dangerous? How can it be so? Surely multiple instances of SQLite shouldn't read the same backing file..

The whole job of sqlite is to handle the locking to keep such accesses safe.

Ok, I see. I did some reading and it looks like this to me:

* the DB is supported by a backing file

* this backing file supports multiple read threads simultaneously but writes are locked via filesystem locks

* write performance with multiple writers is therefore dangerous

* read performance is good if no one is writing and consistent even if someone is

Re: Show HN: Switchboard – A mDNS based reverse proxy for personal infrastructure

#38
post #36
post #33

I’m actually looking for something that does the mDNS registration for multiple back-end services (I did https://github.com/piku/avahi-aliases for announcing mDNS hostnames, which will go along nicely with this, but wanted an all-in-one or a Traefik/Caddy plugin that would do the registration itself).

Would you be willing to make a Caddy plugin for it? Here's how: https://caddyserver.com/docs/extending-caddy

I'm trying to figure out whether or not I keep using DBus and leverage Avahi or not, but that's the general idea - either Caddy or Traefik.
Post reply on HN