write main rs

This commit is contained in:
MeexReay 2025-07-28 15:09:55 +03:00
parent f53eaff1f7
commit 7087e6b131
2 changed files with 31 additions and 3 deletions

View file

@ -8,4 +8,4 @@ bcrypt = "0.17.0"
clap = { version = "4.5.41", features = ["derive"] }
quinn = { version = "0.11.8", features = ["rustls"] }
rustls = { version = "0.23.30", features = ["ring"] }
tokio = { version = "1.47.0", features = ["rt", "macros"] }
tokio = { version = "1.47.0", features = ["rt", "macros", "rt-multi-thread"] }

View file

@ -1,6 +1,34 @@
use clap::Parser;
mod client;
mod server;
fn main() {
println!("Hello, world!");
/// Proxy that based on QUIC
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Connect to proxy
#[arg(short, long)]
connect: Option<String>,
/// Bind proxy
#[arg(short, long)]
bind: Option<String>,
/// Password
#[arg(short, long, default_value = "nope")]
password: String,
}
#[tokio::main]
async fn main() {
let args = Args::parse();
if let Some(host) = args.bind {
todo!()
} else if let Some(host) = args.connect {
todo!()
} else {
println!("choose either --connect or --bind")
}
}