9 releases (5 breaking)
0.5.0 | Sep 18, 2023 |
---|---|
0.4.0 | May 10, 2023 |
0.3.0 | Apr 29, 2023 |
0.2.0 | Apr 24, 2023 |
0.0.0 | Mar 21, 2023 |
#18 in #cidr
33 downloads per month
165KB
4.5K
SLoC
WireTun
This library provides a cross-platform, asynchronous (with Tokio) WireGuard implementation.
WARNING: This library is still in early development and is not ready for production use.
[dependencies]
wiretun = { version = "*", features = ["uapi"] }
Example
use wiretun::{Cidr, Device, DeviceConfig, PeerConfig, uapi};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = DeviceConfig::default()
.listen_port(40001);
let device = Device::native("utun88", cfg).await?;
uapi::bind_and_handle(device.control()).await?;
Ok(())
}
More examples can be found in the examples directory.
Minimum supported Rust version (MSRV)
1.66.1
License
This project is licensed under the Apache 2.0 license.
Dependencies
~10–21MB
~293K SLoC