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