fix(shadowsocks): tokio-tfo deps only for supported platforms

TFO is only enabled for Windows, Linux, Android, macOS (iOS, ...), FreeBSD.
fix #1487
This commit is contained in:
ty
2024-04-07 01:33:47 +08:00
parent 6247f1a7a8
commit 9b3d8839b7
+3 -1
View File
@@ -81,7 +81,6 @@ tokio = { version = "1.9.0", features = [
"sync",
"time",
] }
tokio-tfo = "0.2.0"
hickory-resolver = { version = "0.24", optional = true }
arc-swap = { version = "1.7", optional = true }
@@ -96,6 +95,9 @@ shadowsocks-crypto = { version = "0.5.4", features = ["ring"] }
[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
shadowsocks-crypto = { version = "0.5.4", features = [] }
[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]
tokio-tfo = "0.2.0"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = [
"Win32_Foundation",