diff --git a/cli/src/sources/mod.rs b/cli/src/sources/mod.rs index 73501e7..8da16ec 100644 --- a/cli/src/sources/mod.rs +++ b/cli/src/sources/mod.rs @@ -28,6 +28,8 @@ pub enum Source { Sourcehut(String), Gitlab(String), Codeberg(String), + // TODO: Add domain validation + WellKnown(String), #[serde(deserialize_with = "helpers::string_or_struct")] Tangled(ATProto), } @@ -54,6 +56,10 @@ impl Fetch for Source { url: format!("https://codeberg.org/{user}.keys"), } .fetch(), + Source::WellKnown(ref host) => Http { + url: format!("https://{host}/.well-known/ssh-known-hosts"), + } + .fetch(), Source::Tangled(ref atproto) => atproto.fetch(), } } diff --git a/docs/fuk.1.scd b/docs/fuk.1.scd index 1cdb7ee..44a4a8e 100644 --- a/docs/fuk.1.scd +++ b/docs/fuk.1.scd @@ -44,6 +44,10 @@ must be a list of entries to be present in output. Each entry must have at least _url_ for equivalent entries. In order these would be _github.com_, _gitlab.com_, _meta.sr.ht_, and _codeberg.org_. +*well-known* + Shortcut for *http* that uses well-known URI for SSH hosts. + See: https://c2sp.org/well-known-ssh-hosts + *tangled* Support for _tangled.sh_ keys stored in the ATProto profile. Accepts either string, which should be either DID or handle (with or without