chore: add protocols enum

This commit is contained in:
Keivan-sf
2023-10-08 20:46:52 +03:30
parent 29348fcc10
commit a77da502ed
2 changed files with 34 additions and 1 deletions

View File

@@ -1,3 +1,18 @@
use std::process::exit;
mod parser;
fn main() {
println!("Hello, world!");
let protocol = parser::get_uri_format("vmess://");
match protocol {
Some(parser::protocols::Vless) => {
println!("The protocol was Vless");
}
Some(_) => {
println!("Some recognizable protocol")
}
None => {
println!("The protocol is not supported");
exit(0);
}
}
}