mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
add clearnet functionality to frontend (#2814)
* add clearnet functionality to frontend * add pattern and add sync db on rpcs * add domain pattern * show acme name instead of url if known * dont blow up if domain not present after delete * use common name for letsencrypt * normalize urls * refactor start-os ui net service * backend migration and rpcs for serverInfo.host * fix cors * implement clearnet for main startos ui * ability to add and remove tor addresses, including vanity * add guard to prevent duplicate addresses * misc bugfixes * better heuristics for launching UIs * fix ipv6 mocks * fix ipv6 display bug * rewrite url selection for launch ui --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use yasi::InternedString;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[error("Invalid ID")]
|
||||
pub struct InvalidId;
|
||||
#[error("Invalid ID: {0}")]
|
||||
pub struct InvalidId(pub(super) InternedString);
|
||||
|
||||
@@ -43,7 +43,7 @@ impl TryFrom<InternedString> for Id {
|
||||
if ID_REGEX.is_match(&value) {
|
||||
Ok(Id(value))
|
||||
} else {
|
||||
Err(InvalidId)
|
||||
Err(InvalidId(value))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ impl TryFrom<String> for Id {
|
||||
if ID_REGEX.is_match(&value) {
|
||||
Ok(Id(InternedString::intern(value)))
|
||||
} else {
|
||||
Err(InvalidId)
|
||||
Err(InvalidId(InternedString::intern(value)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ impl TryFrom<&str> for Id {
|
||||
if ID_REGEX.is_match(value) {
|
||||
Ok(Id(InternedString::intern(value)))
|
||||
} else {
|
||||
Err(InvalidId)
|
||||
Err(InvalidId(InternedString::intern(value)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user