Skip to main content

ts_transport_tun/
lib.rs

1#![doc = include_str!("../README.md")]
2
3mod async_tokio;
4mod config;
5
6pub use async_tokio::AsyncTunTransport;
7pub use config::Config;
8
9/// Errors that may be encountered during tun operations.
10#[derive(Debug, thiserror::Error)]
11pub enum Error {
12    /// An IO error was encountered.
13    #[error(transparent)]
14    IoError(#[from] std::io::Error),
15
16    /// Tried to create a tun device without sufficient permissions.
17    #[error("only root user can create a TUN interface")]
18    RootUserRequired,
19}