Host enum and hidden services (.onion)
We want to support .onion
hostnames for HS, obviously. A question arises: is this arti_client::address::Host::Hostname("blah.onion")
or Host::HSv3(HsId)
or Host::HiddenService
(implicity including any future v4) ?
@nickm writes:
the risk of not splitting these early is that all your code that handles strings needs to know which types of address the string might be, and it's easy to forget to handle some
(where "not splitting early" means use Hostname
)
I find this argument persuasive. However, Host
is exhaustive. Adding variants would be a breaking API change for arti-client
. Also we would probably want to make it non-exhaustive.
And we must decide if this is going to be "HS version" specific. I think the answer probably ought to be "yes", at least going by the fact that v2 addresses and v3 addresses are different. So HSv3
or something.
(We could use OnionServiceV3
, but it's a bit of a mouthful to be typing each time.)