mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1527,7 +1527,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "shadowsocks-rust"
|
||||
version = "1.11.1"
|
||||
version = "1.11.2"
|
||||
dependencies = [
|
||||
"byte_string",
|
||||
"byteorder",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "shadowsocks-rust"
|
||||
version = "1.11.1"
|
||||
version = "1.11.2"
|
||||
authors = ["Shadowsocks Contributors"]
|
||||
description = "shadowsocks is a fast tunnel proxy that helps you bypass firewalls."
|
||||
repository = "https://github.com/shadowsocks/shadowsocks-rust"
|
||||
|
||||
@@ -67,6 +67,7 @@ fn main() {
|
||||
|
||||
(@arg TCP_NO_DELAY: --("tcp-no-delay") !takes_value alias("no-delay") "Set TCP_NODELAY option for socket")
|
||||
(@arg TCP_FAST_OPEN: --("tcp-fast-open") !takes_value alias("fast-open") "Enable TCP Fast Open (TFO)")
|
||||
(@arg TCP_KEEP_ALIVE: --("tcp-keep-alive") +takes_value {validator::validate_u64} "Set TCP keep alive timeout seconds")
|
||||
|
||||
(@arg UDP_TIMEOUT: --("udp-timeout") +takes_value {validator::validate_u64} "Timeout seconds for UDP relay")
|
||||
(@arg UDP_MAX_ASSOCIATIONS: --("udp-max-associations") +takes_value {validator::validate_u64} "Maximum associations to be kept simultaneously for UDP relay")
|
||||
@@ -348,6 +349,14 @@ fn main() {
|
||||
config.fast_open = true;
|
||||
}
|
||||
|
||||
if let Some(keep_alive) = matches.value_of("TCP_KEEP_ALIVE") {
|
||||
config.keep_alive = Some(Duration::from_secs(
|
||||
keep_alive
|
||||
.parse::<u64>()
|
||||
.expect("`tcp-keep-alive` is expecting an integer"),
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
if let Some(mark) = matches.value_of("OUTBOUND_FWMARK") {
|
||||
config.outbound_fwmark = Some(mark.parse::<u32>().expect("an unsigned integer for `outbound-fwmark`"));
|
||||
|
||||
@@ -60,6 +60,7 @@ fn main() {
|
||||
|
||||
(@arg TCP_NO_DELAY: --("tcp-no-delay") !takes_value alias("no-delay") "Set TCP_NODELAY option for socket")
|
||||
(@arg TCP_FAST_OPEN: --("tcp-fast-open") !takes_value alias("fast-open") "Enable TCP Fast Open (TFO)")
|
||||
(@arg TCP_KEEP_ALIVE: --("tcp-keep-alive") +takes_value {validator::validate_u64} "Set TCP keep alive timeout seconds")
|
||||
|
||||
(@arg UDP_TIMEOUT: --("udp-timeout") +takes_value {validator::validate_u64} "Timeout seconds for UDP relay")
|
||||
(@arg UDP_MAX_ASSOCIATIONS: --("udp-max-associations") +takes_value {validator::validate_u64} "Maximum associations to be kept simultaneously for UDP relay")
|
||||
@@ -158,6 +159,14 @@ fn main() {
|
||||
config.fast_open = true;
|
||||
}
|
||||
|
||||
if let Some(keep_alive) = matches.value_of("TCP_KEEP_ALIVE") {
|
||||
config.keep_alive = Some(Duration::from_secs(
|
||||
keep_alive
|
||||
.parse::<u64>()
|
||||
.expect("`tcp-keep-alive` is expecting an integer"),
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
if let Some(mark) = matches.value_of("OUTBOUND_FWMARK") {
|
||||
config.outbound_fwmark = Some(mark.parse::<u32>().expect("an unsigned integer for `outbound-fwmark`"));
|
||||
|
||||
@@ -62,6 +62,7 @@ fn main() {
|
||||
|
||||
(@arg TCP_NO_DELAY: --("tcp-no-delay") !takes_value alias("no-delay") "Set TCP_NODELAY option for socket")
|
||||
(@arg TCP_FAST_OPEN: --("tcp-fast-open") !takes_value alias("fast-open") "Enable TCP Fast Open (TFO)")
|
||||
(@arg TCP_KEEP_ALIVE: --("tcp-keep-alive") +takes_value {validator::validate_u64} "Set TCP keep alive timeout seconds")
|
||||
|
||||
(@arg UDP_TIMEOUT: --("udp-timeout") +takes_value {validator::validate_u64} "Timeout seconds for UDP relay")
|
||||
(@arg UDP_MAX_ASSOCIATIONS: --("udp-max-associations") +takes_value {validator::validate_u64} "Maximum associations to be kept simultaneously for UDP relay")
|
||||
@@ -199,6 +200,14 @@ fn main() {
|
||||
config.fast_open = true;
|
||||
}
|
||||
|
||||
if let Some(keep_alive) = matches.value_of("TCP_KEEP_ALIVE") {
|
||||
config.keep_alive = Some(Duration::from_secs(
|
||||
keep_alive
|
||||
.parse::<u64>()
|
||||
.expect("`tcp-keep-alive` is expecting an integer"),
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
if let Some(mark) = matches.value_of("OUTBOUND_FWMARK") {
|
||||
config.outbound_fwmark = Some(mark.parse::<u32>().expect("an unsigned integer for `outbound-fwmark`"));
|
||||
|
||||
Reference in New Issue
Block a user