Closed
Description
That is, libp2p/specs#80. We'll need to:
- Use https://github.com/miekg/dns to handle parsing/formatting DNS records.
- See https://github.com/grandcat/zeroconf/blob/85eadb44205c14827ae7cbb129bc7eed4488dd25/connection.go#L38-L97 for how to listen for multicast packets. However, we'll need to use https://github.com/libp2p/go-reuseport/blob/b72b23b78b80078df1a7991f6ca39942cb8cc5e1/interface.go#L47-L49 to fix multiple MDNS applications.
Unfortunately, none of the existing golang mdns solutions work for us as:
- They all have race conditions.
- None of them use reuseport.
- All of them are very DNS-SD focused and go through a lot of effort to make sure we get things like A and AAAA records.
- We need to use the system's mDNS responder when possible, as running multiple mDNS responders on the same machine is pretty broken.
We could try to patch these however, we'll likely end up with something better if we just write something ourselves.