use netlink instead of shell cmd to config ip (#593)

This commit is contained in:
Sijie.Sun
2025-02-03 15:13:50 +08:00
committed by GitHub
parent 4aea0821dd
commit a63778854f
10 changed files with 1115 additions and 430 deletions
+7 -1
View File
@@ -89,7 +89,7 @@ tun = { package = "tun-easytier", version = "1.1.1", features = [
"async",
], optional = true }
# for net ns
nix = { version = "0.27", features = ["sched", "socket", "ioctl"] }
nix = { version = "0.29.0", features = ["sched", "socket", "ioctl", "net"] }
uuid = { version = "1.5.0", features = [
"v4",
@@ -197,6 +197,12 @@ prost-reflect = { version = "0.14.5", features = [
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows", target_os = "freebsd"))'.dependencies]
machine-uid = "0.5.3"
[target.'cfg(any(target_os = "linux"))'.dependencies]
netlink-sys = "0.8.7"
netlink-packet-route = "0.21.0"
netlink-packet-core = { version = "0.7.0" }
netlink-packet-utils = "0.5.2"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = [
"Win32_Networking_WinSock",