mokeyish / async-socks5

An async/.await SOCKS5 implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

async-socks5

An async/.await SOCKS5 implementation.

Examples

Connect to google.com:80 through my-proxy-server.com:54321:

use tokio::net::TcpStream;
use tokio::io::BufStream;
use async_socks5::{connect, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let stream = TcpStream::connect("my-proxy-server.com:54321").await?;
  let mut stream = BufStream::new(stream);
  connect(&mut stream, ("google.com", 80), None).await?;
}

More examples.

License

async-socks5 under either of:

at your option.

About

An async/.await SOCKS5 implementation

License:Apache License 2.0


Languages

Language:Rust 100.0%