feat: compress connection keys (rtun2) for easier copy/paste
This commit is contained in:
+3
-2
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user