Files
donutbrowser/src-tauri/src/vpn/mod.rs
T
2026-09-26 10:46:29 +04:00

28 lines
774 B
Rust

//! VPN support module for WireGuard configurations.
//!
//! This module provides:
//! - WireGuard config parsing (`.conf` files)
//! - Encrypted storage for VPN configurations
//! - Tunnel management with userspace WireGuard (boringtun) routed through smoltcp
mod config;
pub mod socks5_server;
mod storage;
mod tunnel;
mod wireguard;
pub use config::{
detect_vpn_type, parse_wireguard_config, VpnConfig, VpnError, VpnImportResult, VpnStatus,
VpnType, WireGuardConfig,
};
pub use storage::VpnStorage;
pub use tunnel::{TunnelManager, VpnTunnel};
pub use wireguard::WireGuardTunnel;
use std::sync::LazyLock;
use std::sync::Mutex;
/// Global VPN storage instance
pub static VPN_STORAGE: LazyLock<Mutex<VpnStorage>> =
LazyLock::new(|| Mutex::new(VpnStorage::new()));