Skip to content

Commit 9b3d883

Browse files
committed
fix(shadowsocks): tokio-tfo deps only for supported platforms
TFO is only enabled for Windows, Linux, Android, macOS (iOS, ...), FreeBSD. fix #1487
1 parent 6247f1a commit 9b3d883

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/shadowsocks/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ tokio = { version = "1.9.0", features = [
8181
"sync",
8282
"time",
8383
] }
84-
tokio-tfo = "0.2.0"
8584

8685
hickory-resolver = { version = "0.24", optional = true }
8786
arc-swap = { version = "1.7", optional = true }
@@ -96,6 +95,9 @@ shadowsocks-crypto = { version = "0.5.4", features = ["ring"] }
9695
[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
9796
shadowsocks-crypto = { version = "0.5.4", features = [] }
9897

98+
[target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos"))'.dependencies]
99+
tokio-tfo = "0.2.0"
100+
99101
[target.'cfg(windows)'.dependencies]
100102
windows-sys = { version = "0.52", features = [
101103
"Win32_Foundation",

0 commit comments

Comments
 (0)