[package] name = "tun-easytier" version = "1.1.1" edition = "2021" authors = ["meh. ", "@ssrlive", "sijie.sun "] license = "WTFPL" description = "TUN device creation and handling." repository = "https://github.com/EasyTier/rust-tun" keywords = ["tun", "network", "tunnel", "bindings"] rust-version = "1.75" [lib] crate-type = ["staticlib", "cdylib", "lib"] [dependencies] bytes = { version = "1" } cfg-if = "1" futures-core = { version = "0.3", optional = true } libc = { version = "0.2", features = ["extra_traits"] } log = "0.4" thiserror = "1" tokio = { version = "1", features = [ "net", "macros", "io-util", ], optional = true } tokio-util = { version = "0.7", features = ["codec"], optional = true } [target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "android", target_os="freebsd"))'.dependencies] nix = { version = "0.29", features = ["ioctl"] } [target.'cfg(target_os = "windows")'.dependencies] windows-sys = { version = "0.59", features = [ "Win32_Foundation", "Win32_Security", "Win32_Security_WinTrust", "Win32_Security_Cryptography", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging", "Win32_System_LibraryLoader", ] } wintun = { version = "0.5", features = ["panic_on_unsent_packets"] } libloading = "0.8" [target.'cfg(any(target_os = "macos", target_os = "freebsd"))'.dependencies] ipnet = "2" [dev-dependencies] ctrlc2 = { version = "3", features = ["tokio", "termination"] } env_logger = "0.11" futures = "0.3" packet = "0.1" serde_json = "1" tokio = { version = "1", features = ["rt-multi-thread"] } [features] default = ["wintun-dns"] async = ["tokio", "futures-core", "tokio-util"] wintun-dns = [] [package.metadata.docs.rs] features = ["async"] [[example]] name = "read-async" required-features = ["async"] [[example]] name = "read-async-codec" required-features = ["async"] [[example]] name = "ping-tun" required-features = ["async"]