Przeglądaj źródła

url/parser: Add additional schemes

parazyd 1 rok temu
rodzic
commit
8323473bd0
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      url/src/parser.rs

+ 2 - 1
url/src/parser.rs

@@ -176,7 +176,8 @@ impl SchemeType {
 impl<T: AsRef<str>> From<T> for SchemeType {
     fn from(s: T) -> Self {
         match s.as_ref() {
-            "http" | "https" | "ws" | "wss" | "ftp" => Self::SpecialNotFile,
+            "tcp" | "tcp+tls" | "tor" | "tor+tls" | "socks5" | "socks5+tls" | "nym" | "nym+tls"
+            | "quic" | "http" | "https" | "ws" | "wss" | "ftp" => Self::SpecialNotFile,
             "file" => Self::File,
             _ => Self::NotSpecial,
         }