Files
v2ray-proxy/src/parser/mod.rs
2023-10-08 20:46:52 +03:30

19 lines
335 B
Rust

pub enum protocols {
Vmess,
Vless,
Shadowsocks,
Trojan,
Socks,
Http,
}
pub fn get_uri_format(uri: &str) -> Option<protocols> {
if uri.starts_with("vmess://") {
return Some(protocols::Vmess);
}
if uri.starts_with("vless://") {
return Some(protocols::Vless);
}
return None;
}