~whynothugo/dotfiles#12: 
Solid solution for mDNS resolution

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.

Status
REPORTED
Submitter
~whynothugo
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~whynothugo 2 years ago

So far, it seems that this is doable with unbound by using its Stub Zone Options (see unbound.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).

~whynothugo 2 years ago

This also seems relevant:

https://github.com/NLnetLabs/unbound/blob/b86a97019fccd647614592d49e20d45054db638b/pythonmod/examples/avahi-resolver.py#L372

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.

~whynothugo 2 years ago

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.
Register here or Log in to comment, or comment via email.