| Crates.io | tun2socks |
| lib.rs | tun2socks |
| version | 0.1.10 |
| created_at | 2023-06-03 16:05:22.500352+00 |
| updated_at | 2025-08-22 11:28:00.007284+00 |
| description | High performance tun2socks |
| homepage | |
| repository | https://github.com/heiher/tun2socks |
| max_upload_size | |
| id | 881742 |
| size | 5,145,933 |
Rust bindings for HevSocks5Tunnel
See here for more details.



/// Start and run the socks5 tunnel, this function will blocks until the
/// quit() is called or an error occurs.
///
/// # Arguments
///
/// * `config_path` - config file path
/// * `tun_fd` - tunnel file descriptor
///
/// # Returns
///
/// Returns Ok(()) on successful, otherwise returns Err(r).
pub fn main_from_file(config_path: &Path, tun_fd: RawFd) -> Result<(), i32>
/// Start and run the socks5 tunnel, this function will blocks until the
/// quit() is called or an error occurs.
///
/// # Arguments
///
/// * `config_str` - config string
/// * `tun_fd` - tunnel file descriptor
///
/// # Returns
///
/// Returns Ok(()) on successful, otherwise returns Err(r).
pub fn main_from_str(config_str: &str, tun_fd: RawFd) -> Result<(), i32>
/// Stop the socks5 tunnel.
pub fn quit()
MIT