14 Commits

Author SHA1 Message Date
Benoît Ganne
6dd954687e add support for peer auto-discovery in wgsd
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
2020-12-08 13:45:07 +01:00
Benoît Ganne
106dca421c always use full Service Instance Name
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.
2020-12-08 13:45:07 +01:00
Jordan Whited
89263dec22 add ServeDNS() tests 2020-05-27 16:29:09 -07:00
Jordan Whited
dbe0623624 don't return SRV answer if endpoint is nil 2020-05-15 13:15:42 -07:00
Jordan Whited
5c7c582a2a trivial fixes 2020-05-15 13:01:58 -07:00
Jordan Whited
166a81ace1 ToUpper() pubkey in targets 2020-05-13 20:59:42 -07:00
Jordan Whited
4e16d5b9fc represent pub keys in Base32 2020-05-13 16:15:48 -07:00
Jordan Whited
385d7b0582 fix PTR answer target 2020-05-13 14:06:49 -07:00
Jordan Whited
48c4ad579d name -> zone 2020-05-12 17:44:52 -07:00
Jordan Whited
c103287912 add TODO for SOA 2020-05-12 17:37:20 -07:00
Jordan Whited
8f7de25397 handle A/AAAA queries 2020-05-12 17:35:05 -07:00
Jordan Whited
8109291569 handle SRV queries 2020-05-12 17:13:40 -07:00
Jordan Whited
e6531c81ed start on ServeDNS() for PTR queries 2020-05-12 15:39:48 -07:00
Jordan Whited
9cf6a70617 initial commit 2020-05-09 16:47:41 -07:00