From d6e15e61d60664be1aae18984215cc420f9f35cf Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sun, 1 Oct 2023 13:05:01 +0800 Subject: [PATCH] minor changes --- README.md | 2 +- src/main.rs | 6 +++--- src/tun2proxy.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4b245e0..5e73860 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Options: --dns-addr DNS resolver address [default: 8.8.8.8] -6, --ipv6-enabled IPv6 enabled -s, --setup Routing and system setup [possible values: auto] - --bypass-ip Public proxy IP used in routing setup which should bypassing the tunnel + -b, --bypass Public proxy IP used in routing setup which should bypassing the tunnel -v, --verbosity Verbosity level [default: info] [possible values: off, error, warn, info, debug, trace] -h, --help Print help -V, --version Print version diff --git a/src/main.rs b/src/main.rs index dfaae3d..ac29b0b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,8 +42,8 @@ struct Args { setup: Option, /// Public proxy IP used in routing setup which should bypassing the tunnel - #[arg(long, value_name = "IP")] - bypass_ip: Option, + #[arg(short, long, value_name = "IP")] + bypass: Option, /// Verbosity level #[arg(short, long, value_name = "level", value_enum, default_value = "info")] @@ -116,7 +116,7 @@ fn main() -> ExitCode { } }; - let bypass_tun_ip = match args.bypass_ip { + let bypass_tun_ip = match args.bypass { Some(addr) => addr, None => args.proxy.addr.ip(), }; diff --git a/src/tun2proxy.rs b/src/tun2proxy.rs index d9b99ee..7dafcfc 100644 --- a/src/tun2proxy.rs +++ b/src/tun2proxy.rs @@ -1173,7 +1173,7 @@ impl<'a> TunToProxy<'a> { count += 1; } Err(err) => { - println!("Failed to send exit signal: \"{}\"", err); + log::error!("Failed to send exit signal: \"{}\"", err); break; } }