Crate wiretun

source ·
Expand description

WireTun

WireTun is a user-space WireGuard implementation in Rust.

What is WireGuard?

WireGuard is a modern, high-performance VPN protocol that is designed to be simple to use and easy to configure. It is often used to create secure private networks and build reliable, low-latency connections.

Features

  • Implementation of the WireGuard protocol in Rust.
  • Asynchronous I/O using Tokio.

Examples

use wiretun::{Cidr, Device, DeviceConfig, PeerConfig};

#[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?;
   Ok(())
}

Re-exports

Modules

Structs

Enums

Traits

  • Transport is a trait that represents a network transport.