write main rs
This commit is contained in:
parent
f53eaff1f7
commit
7087e6b131
2 changed files with 31 additions and 3 deletions
32
src/main.rs
32
src/main.rs
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue