| Crates.io | wiretun |
| lib.rs | wiretun |
| version | 0.5.0 |
| created_at | 2023-03-21 11:02:28.331213+00 |
| updated_at | 2023-09-18 07:22:12.359013+00 |
| description | WireGuard Library |
| homepage | https://github.com/lodrem/wiretun |
| repository | https://github.com/lodrem/wiretun |
| max_upload_size | |
| id | 816105 |
| size | 192,941 |
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"] }
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.
1.66.1
This project is licensed under the Apache 2.0 license.