Files
v2ray-proxy/src/main.rs

21 lines
509 B
Rust
Raw Normal View History

2023-10-08 20:46:52 +03:30
mod parser;
use clap::Parser;
2023-11-07 16:36:30 +03:30
pub mod config_models;
pub mod utils;
2023-10-24 17:00:00 +03:30
#[derive(Parser)]
2025-07-10 22:59:34 +03:30
#[command(author ,version = "0.1.1", about = "V2ray URI parser", long_about = None)]
2023-10-24 17:00:00 +03:30
struct Cli {
uri: String,
#[arg(long, value_name = "socksport")]
2023-10-24 17:00:00 +03:30
socksport: Option<u16>,
2025-07-26 19:25:55 +03:30
#[arg(long, value_name = "httpport")]
httpport: Option<u16>,
2023-10-24 17:00:00 +03:30
}
2023-10-06 18:16:44 +03:30
fn main() {
2023-10-24 17:00:00 +03:30
let cli = Cli::parse();
2025-07-26 19:25:55 +03:30
let json_config = parser::create_json_config(&cli.uri, cli.socksport, cli.httpport);
2023-11-09 12:41:09 +03:30
println!("{}", json_config);
2023-10-06 18:16:44 +03:30
}