fix: build tun only for supported platforms (#1934)

This commit is contained in:
zonyitoo
2025-04-09 22:27:04 +08:00
parent fe71d5f2dc
commit e27d27c694

View File

@@ -178,7 +178,6 @@ flate2 = { version = "1.0", optional = true }
brotli = { version = "7.0", optional = true }
zstd = { version = "0.13", optional = true }
tun = { version = "0.7", optional = true, features = ["async"] }
etherparse = { version = "0.17", optional = true }
smoltcp = { version = "0.12", optional = true, default-features = false, features = [
"std",
@@ -206,6 +205,9 @@ nix = { version = "0.29", features = ["ioctl"] }
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_Networking_WinSock"] }
[target.'cfg(any(target_os = "ios", target_os = "macos", target_os = "linux", target_os = "android", target_os = "windows", target_os = "freebsd"))'.dependencies]
tun = { version = "0.7", optional = true, features = ["async"] }
[dev-dependencies]
byteorder = "1.5"
env_logger = "0.11"