From 15646925a79af9c8e45985cb4b0c460ded821d72 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:01:58 +0800 Subject: [PATCH] issues of parameter constraint for 'tun' --- src/args.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/args.rs b/src/args.rs index ef6e636..f4f5331 100644 --- a/src/args.rs +++ b/src/args.rs @@ -20,7 +20,8 @@ pub struct Args { /// Name of the tun interface, such as tun0, utun4, etc. /// If this option is not provided, the OS will generate a random one. - #[arg(short, long, value_name = "name", conflicts_with = "tun_fd", value_parser = validate_tun)] + #[arg(short, long, value_name = "name", value_parser = validate_tun)] + #[cfg_attr(unix, arg(conflicts_with = "tun_fd"))] pub tun: Option, /// File descriptor of the tun interface