pronebird / tun2socks

Rust bindings for HevSocks5Tunnel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tun2Socks

Rust bindings for HevSocks5Tunnel

Features

  • IPv4/IPv6. (dual stack)
  • Redirect TCP connections.
  • Redirect UDP packets. (Fullcone NAT, UDP in UDP/TCP)
  • Linux/Android/FreeBSD/macOS/iOS.

Benchmarks

See here for more details.

Speed

CPU usage

Memory usage

API

/// 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 non-zero.
pub fn main(config_path: &Path, tun_fd: RawFd) -> Result<(), i32>

/// Stop the socks5 tunnel.
pub fn quit()

Contributors

License

MIT

About

Rust bindings for HevSocks5Tunnel

License:MIT License


Languages

Language:Rust 100.0%