I want mDNS resolution to work regardless of whether the system exposes itself via mDNS or not.
The main goal here is that if I type http://rpi.local
on Firefox, it should resolve that domain using mDNS.
So far, it seems that this is doable with
unbound
by using itsStub Zone Options
(seeunbound.conf(5)
). Basically, it should be possible to delegate the.local
domain to a specific DNS server.This approach requires a service that exposes a DNS interface, but does mDNS resolution under the hood.
mdns-proxy seems to provide this functionality, but relies on Avahi, which I'm not sure will work everywhere (notably, I want musl support).
This also seems relevant:
Need to really test Avahi and see how well it works. In particular, I should confirm that the resolver can be used without the advertiser.
Avahi is abandoned upstream, so pursuing that direction is not worth the effort. It makes a lot more sense to:
- Write a library that can resolve mDNS. Using the
domain
crate might be wise since I can reuse a lot of bits (mostly, everything save the networking itself).- Write a daemon on top of that that proxies as a DNS server to fit into the pattern described above.