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
§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§
pub use noise::crypto::LocalStaticSecret;
pub use noise::crypto::PeerStaticSecret;
Modules§
Structs§
- Cidr
- Cidr represents a CIDR block.
- Device
- A WireGuard device.
- Device
Config - Configuration for a device.
- Device
Control - A handle to a device.
- Endpoint
- Native
Tun - Native tun implementation.
- Peer
Config - Configuration for a peer.
- UdpTransport
- UdpTransport is a UDP transport that implements the
Transport
trait.