An open API service indexing awesome lists of open source software.

https://github.com/zarvd/wiretun

WireGuard implementation in Rust with Tokio
https://github.com/zarvd/wiretun

rust tokio wireguard

Last synced: 2 months ago
JSON representation

WireGuard implementation in Rust with Tokio

Awesome Lists containing this project

README

          

# WireTun

[github](https://github.com/zarvd/wiretun)
[crates.io](https://crates.io/crates/wiretun)
[docs.rs](https://docs.rs/wiretun)
[build status](https://github.com/zarvd/wiretun/actions?query%3Amaster)
[dependency status](https://deps.rs/repo/github/zarvd/wiretun)

This library provides a cross-platform, asynchronous (with [Tokio](https://tokio.rs/)) [WireGuard](https://www.wireguard.com/) implementation.

**WARNING**: This library is still in early development and is not ready for production use.

```toml
[dependencies]
wiretun = { version = "*", features = ["uapi"] }
```

## Example

```rust
use wiretun::{Cidr, Device, DeviceConfig, PeerConfig, uapi};

#[tokio::main]
async fn main() -> Result<(), Box> {
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](examples) directory.

## Minimum supported Rust version (MSRV)

1.66.1

## License

This project is licensed under the [Apache 2.0 license](LICENSE).