mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 06:57:52 +00:00
20 lines
488 B
Rust
20 lines
488 B
Rust
use std::process::exit;
|
|
mod uri_identifier;
|
|
mod vless;
|
|
pub mod config_models;
|
|
pub fn parse(uri: &str) {
|
|
let protocol = uri_identifier::get_uri_protocol(uri);
|
|
match protocol {
|
|
Some(uri_identifier::Protocols::Vmess) => {
|
|
println!("The protocol was vmess");
|
|
}
|
|
Some(_) => {
|
|
println!("The protocol was recognized");
|
|
}
|
|
None => {
|
|
println!("The protcol is not supported");
|
|
exit(0);
|
|
}
|
|
}
|
|
}
|