Skip to main content

Module tunnel

Module tunnel 

Source
Expand description

§VCL Tunnel

VCLTunnel is a high-level facade that combines all VCL components into a single easy-to-use object for building VPN applications.

Instead of manually wiring together VCLConnection, VCLTun, KeepaliveManager, ReconnectManager, DnsFilter, Obfuscator, and MtuNegotiator — just create a VCLTunnel.

§Example

use vcl_protocol::tunnel::{VCLTunnel, TunnelConfig};

#[tokio::main]
async fn main() {
    let config = TunnelConfig::mobile("10.0.0.1", "10.0.0.2");
    println!("Tunnel config created: {:?}", config.obfuscation_mode);
}

Structs§

TunnelConfig
High-level tunnel configuration.
TunnelStats
Statistics snapshot from the tunnel.
VCLTunnel
High-level VPN tunnel facade.

Enums§

TunnelState
Current state of the tunnel.