cors_proxy/
cli.rs

1use clap::Parser;
2use std::net::Ipv4Addr;
3
4#[derive(Parser, Debug)]
5#[command(version, about, long_about = None)]
6pub struct CliOptions {
7    #[arg(long, default_value = "127.0.0.1")]
8    host: Ipv4Addr,
9    #[arg(short, long, default_value = "3000")]
10    port: u16,
11}
12
13pub async fn cli_main() -> Result<(), std::io::Error> {
14    let args = CliOptions::parse();
15    crate::server::serve_proxy(args.host, args.port).await
16}