resolved OUTBOUND_BIND_INTERFACE duplication

ref shadowsocks/shadowsocks-android#2667
This commit is contained in:
zonyitoo
2021-02-08 09:31:29 +08:00
parent 63be38deca
commit 39c8d5fb3c
3 changed files with 17 additions and 3 deletions

View File

@@ -108,7 +108,7 @@ fn main() {
);
}
#[cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "ios"))]
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
app = clap_app!(@app (app)
(@arg OUTBOUND_BIND_INTERFACE: --("outbound-bind-interface") +takes_value "Set IP_BOUND_IF option for outbound socket")

View File

@@ -88,8 +88,15 @@ fn main() {
#[cfg(any(target_os = "linux", target_os = "android"))]
{
app = clap_app!(@app (app)
(@arg OUTBOUND_FWMARK: --("outbound-fwmark") +takes_value {validator::validate_u32} "Set SO_MARK option for outbound socket")
(@arg OUTBOUND_BIND_INTERFACE: --("outbound-bind-interface") +takes_value "Set SO_BINDTODEVICE option for outbound socket")
(@arg OUTBOUND_FWMARK: --("outbound-fwmark") +takes_value {validator::validate_u32} "Set SO_MARK option for outbound socket")
);
}
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
app = clap_app!(@app (app)
(@arg OUTBOUND_BIND_INTERFACE: --("outbound-bind-interface") +takes_value "Set IP_BOUND_IF option for outbound socket")
);
}

View File

@@ -95,8 +95,15 @@ fn main() {
#[cfg(any(target_os = "linux", target_os = "android"))]
{
app = clap_app!(@app (app)
(@arg OUTBOUND_FWMARK: --("outbound-fwmark") +takes_value {validator::validate_u32} "Set SO_MARK option for outbound socket")
(@arg OUTBOUND_BIND_INTERFACE: --("outbound-bind-interface") +takes_value "Set SO_BINDTODEVICE option for outbound socket")
(@arg OUTBOUND_FWMARK: --("outbound-fwmark") +takes_value {validator::validate_u32} "Set SO_MARK option for outbound socket")
);
}
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
app = clap_app!(@app (app)
(@arg OUTBOUND_BIND_INTERFACE: --("outbound-bind-interface") +takes_value "Set IP_BOUND_IF option for outbound socket")
);
}