Files
bore/src/main.rs

42 lines
898 B
Rust
Raw Normal View History

use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[clap(author, version, about)]
#[clap(propagate_version = true)]
struct Args {
#[clap(subcommand)]
command: Command,
}
#[derive(Subcommand, Debug)]
enum Command {
/// Starts a local proxy to the remote server.
Local {
/// The local port to listen on.
local_port: u16,
/// Address of the remote server to expose local ports to.
#[clap(short, long)]
to: String,
/// Optional port on the remote server to select.
#[clap(short, long, default_value_t = 0)]
port: u16,
},
/// Runs the remote proxy server.
Server {
/// Minimum TCP port number to accept.
#[clap(long, default_value_t = 1024)]
min_port: u16,
},
}
2022-04-03 19:58:51 -04:00
fn main() {
let args = Args::parse();
println!("{:?}", args);
2022-04-03 19:58:51 -04:00
println!("bore cli running");
}