mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-16 23:17:53 +00:00
21 lines
509 B
Rust
21 lines
509 B
Rust
mod parser;
|
|
use clap::Parser;
|
|
pub mod config_models;
|
|
pub mod utils;
|
|
|
|
#[derive(Parser)]
|
|
#[command(author ,version = "0.1.1", about = "V2ray URI parser", long_about = None)]
|
|
struct Cli {
|
|
uri: String,
|
|
#[arg(long, value_name = "socksport")]
|
|
socksport: Option<u16>,
|
|
#[arg(long, value_name = "httpport")]
|
|
httpport: Option<u16>,
|
|
}
|
|
|
|
fn main() {
|
|
let cli = Cli::parse();
|
|
let json_config = parser::create_json_config(&cli.uri, cli.socksport, cli.httpport);
|
|
println!("{}", json_config);
|
|
}
|