Closed cookiengineer closed 3 years ago
After further analysis and read-up of the DNS-SD website this will be the workflow for Stealth's peer-to-peer DNS capabilities; while preserving integration with legacy Web Browsers that try to discover local peers and their webservers:
224.0.0.251
and/or ff02::fb
on port 5353
.<instance>.<service>.tholian.local
where service
is equivalent to _stealth._wss
.1
for dgram udp packets to stay inside local NAT.DNS-SD scenario on UDP port 5353
to discover peers when starting Stealth:
Send out question for PTR
record of _stealth._wss.tholian.local
.
Primary answer is PTR
for _stealth._wss.tholian.local
pointing to username._stealth._wss.tholian.local
on port 65432
.
Additional records must contain:
SRV
for username._stealth._wss.tholian.local
with target set to username.tholian.local
TXT
for username._stealth._wss.tholian.local
with version=X0
A
for username.tholian.local
AAAA
for username.tholian.local
If no response was sent, then do the same for _stealth._ws.tholian.local
(to find peers without TLS certificates)
Peer-DNS scenario on UDP port 65432
to resolve domains via other Peers that might not be blocked:
Send out question for A
and AAAA
of example.com
to multicast address.
Reply with local cached hosts[]
entries.
hosts[]
entries are available:Initial Client's peer-DNS query timeouts should lead to retry of DNS query to public DNS servers.
The MDNS Protocol has been implemented and is already integrated. Now it's up to the stealth/server/Compeer
instance to add peers to the this.stealth.peers[]
Array.
The Multicast DNS Protocol should transparently implement DNS-based Service Discovery (DNS-SD.org) and use the
SRV
andPTR
queries/responses workflow._stealth._wss.tholian.network
to connect to the Radar service to discover global peers._stealth._wss.tholian.local
to the Multicast DNS address (224.0.0.1
orff02::fb
respectively).wss
due to lack of TLS certificate or socket-trust issues, fallback tows
and mark connection as untrusted - which will require manual confirmation of the user.