[package]
name = "cross_platform_tun"
version = "0.1.5"
edition = "2021"
license = "MIT"
authors = ["dawson a957360688@gmail.com"]
repository = "https://github.com/Dawson-Jones/cross_platform_tun"
description = "cross platform tun device implement"
[dependencies]
libc = "0.2"
thiserror = "1.0.48"
nix = { version = "0.27.1", default-features = false, features = ["ioctl"] }
tokio = { version = "1", features = ["net", "macros"], optional = true }
tokio-util = { version = "0.7", features = ["codec"], optional = true }
bytes = { version = "1", optional = true }
byteorder = { version = "1", optional = true }
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
ioctl = { version = "0.8", package = "ioctl-sys" }
[target.'cfg(target_os = "windows")'.dependencies]
wintun = { version = "0.3", features = ["panic_on_unsent_packets"] }
[features]
async = ["tokio", "tokio-util", "bytes", "byteorder"]
default = ["async"]
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
futures = "0.3"
packet = "0.1"
[[example]]
name = "async_read"
[[example]]
name = "async_stream"
[[example]]
name = "async_ping"