From 7655dee3fb52270446a85c8f8cc0a9d2d7a2eb7e Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:52:15 +0800 Subject: [PATCH] ArgProxyType --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index ad2162d..2f1b9b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ struct Args { /// What proxy type to run #[arg(short, long = "proxy", value_name = "type", value_enum)] - proxy_type: ProxyType, + proxy_type: ArgProxyType, /// Server address with format ip:port #[clap(short, long, value_name = "ip:port")] @@ -28,7 +28,7 @@ struct Args { } #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)] -enum ProxyType { +enum ArgProxyType { /// SOCKS5 server to use Socks5, /// HTTP server to use @@ -41,11 +41,11 @@ fn main() { let mut ttp = TunToProxy::new(&args.tun); match args.proxy_type { - ProxyType::Socks5 => { + ArgProxyType::Socks5 => { log::info!("SOCKS5 server: {}", args.addr); ttp.add_connection_manager(Box::new(Socks5Manager::new(args.addr))); } - ProxyType::Http => { + ArgProxyType::Http => { log::info!("HTTP server: {}", args.addr); ttp.add_connection_manager(Box::new(HttpManager::new(args.addr))); }