🛂 Check for required permissions
On Linux, checks for the `CAP_NET_ADMIN` capability. On macOS, checks for root.
This commit is contained in:
parent
6bd8051c78
commit
40cc0ba049
7 changed files with 60 additions and 5 deletions
|
|
@ -10,3 +10,9 @@ crate-type = ["lib", "staticlib"]
|
|||
tokio = { version = "1.21", features = ["rt", "macros"] }
|
||||
tun = { version = "0.1", path = "../tun" }
|
||||
clap = { version = "4.3.2", features = ["derive"] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
caps = "0.5.5"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
nix = { version = "0.26.2" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue