use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "proxyhunt")]
#[command(about = "A fast, modern proxy scraper and checker", long_about = None)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
#[arg(short, long, default_value = "config.toml")]
pub config: String,
#[arg(short, long)]
pub verbose: bool,
}
#[derive(Subcommand)]
pub enum Commands {
Check(CheckArgs),
Quick(QuickArgs),
}
#[derive(Parser, Debug, Clone)]
pub struct CheckArgs {
#[arg(long)]
pub http: bool,
#[arg(long)]
pub socks4: bool,
#[arg(long)]
pub socks5: bool,
#[arg(short, long)]
pub sources: Vec<String>,
#[arg(short, long, default_value = "proxies.txt")]
pub output: String,
#[arg(long)]
pub json: Option<String>,
#[arg(short, long)]
pub limit: Option<usize>,
#[arg(short, long, default_value_t = 512)]
pub concurrency: usize,
#[arg(short, long, default_value_t = 10)]
pub timeout: u64,
#[arg(long, default_value_t = 5)]
pub connect_timeout: u64,
#[arg(long)]
pub max: Option<usize>,
#[arg(long, default_value = "https://ipv4.icanhazip.com")]
pub check_url: String,
#[arg(long)]
pub geoip_db: Option<String>,
#[arg(long)]
pub no_enrich: bool,
}
#[derive(Parser, Debug, Clone)]
pub struct QuickArgs {
#[arg(short, long, default_value = "proxies.txt")]
pub output: String,
#[arg(long)]
pub max: Option<usize>,
#[arg(short, long, default_value_t = 512)]
pub concurrency: usize,
#[arg(short, long)]
pub limit: Option<usize>,
}