feat: compress connection keys (rtun2) for easier copy/paste

This commit is contained in:
bzuccaro
2026-08-02 12:07:54 -06:00
parent ab1f74214a
commit 6bc3c00b64
13 changed files with 97 additions and 25 deletions
+3 -2
View File
@@ -120,7 +120,7 @@ pub fn is_auth_token(content: &str) -> bool {
#[allow(dead_code)]
pub fn is_connection_key(content: &str) -> bool {
content.trim_start().starts_with("rtun1.")
content.trim_start().starts_with("rtun2.")
}
#[cfg(test)]
@@ -213,8 +213,9 @@ mod tests {
#[test]
fn is_connection_key_detects_rtun_prefix() {
assert!(is_connection_key("rtun1.abc"));
assert!(is_connection_key("rtun2.abc"));
assert!(!is_connection_key("abc"));
assert!(!is_connection_key("rtun1.abc"));
}
#[test]