Feature request - announcing HOST records (A/AAAA)
I saw the discussions about the hostname resolution and am happily using this right now. But I would love to have a way to announce a hostname as well.
My use case: I have applications deployed in really messy real-world networks outside of my control. mDNS is used for auto-discovery wherever possible, otherwise there's a fallback to humans with little technical background to provide the right IP addresses. This is error-prone.
What I would like to add is a way to announce well-known hostnames from clients that are successfully connected.
Server (running avahi) <--- subnets/routing/things breaking mDNS ---> Client A (manually configured by a human, probably on a phone call, to reach the server)
If there's a Client B right next to A in the same subnet, I would like to make A announce "Anyone trying to figure out where example.com is? I got it, guys. Talking to example.com right now". B would just resolve it normally as if on the same subnet as avahi/the server.
Would that be a possible addition for this crate?
AFAIK, there is no commonly used or standardized mDNS service type for announcing other name servers.
In your case, you can publish a custom service type on client A using this crate (ServiceDaemon::register). And use TXT records (TxtProperties) to specify the name server address for example.com.
@darklajid I looked into this a bit more. I think we could add a new method in ServiceDaemon to just announce hostname records (A and/or AAAA records). Do you have any ideas what kind of API you would like to use?
EDIT: maybe call the new method register_hostname ?