This patch allows wgsd-client to auto-discover other mesh peers:
- use peer allowed ip and pubkey from TXT record in SRV answer
- iterate on peers extracted from PTR answer instead of local wireguard
configuration: the client no longer need to pre-configured with all the
peers
- allow to connect to a specific peer using its pubkey or allowed ip
This patch allows clients to auto-discover other mesh peers:
- add a TXT record to default SRV answer containing the allowed ip and
public key: clients no longer have to have other peers pre-configured,
all necessary configuration is contained in the SRV record. Only a
connection to the registry is necessary to be allowed to connect to any
other peer
- allow clients to request SRV records by allowed ip in addition to
public key: a client wanted to communicate with a specific ip can now
discover the associated peer w/o knowing its public key before-hand
Limitations:
- the exported allowed ip config is only the 1st subnet configured
- for 2 peers to communicate, both must setup the wireguard association
Service instance name is defined in RFC6763 section 4.1 as
Service Instance Name = <Instance> . <Service> . <Domain>
Use it instead of <Instance> . <Domain> for consistency.