sargassum-world / latreutes

Desktop application for connecting to ZeroTier networks
Apache License 2.0
1 stars 1 forks source link

Join ZeroTier network by entering hostname #7

Closed ethanjli closed 3 years ago

ethanjli commented 3 years ago

The user should be able to type in a hostname (e.g. prakashlab.dedyn.io) to try to join a network, rather than having to type in the full network ID. In the future we'll default to having user-friendly domain names from registries instead of requiring typing a domain name, but this is enough for now as a proof-of-concept.

ethanjli commented 3 years ago

One way we could enable lookup is by adding a TXT record to a domain name, e.g. "sargassum-network-id=897a891jkl1jdf1". However, I'm not sure if our application would be able to perform a DNS lookup like that - certainly not in Javascript. We'd probably need to use a Rust crate like trust-dns-resolver.

Another option is to put it at a GET endpoint, such as /.well-known/sargassum; this limits a domain name to only one "primary" network. We could also resolve it with WebFinger. However, both of these options would add a requirement for the domain to run an HTTP server (which could be static if we don't need WebFinger), which is a lot to ask of backends. I suspect that we'll only need these for lookups of names in registries, and that it'd be fine to just use a TXT record to look up the network ID associated with a domain name or subdomain.