Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.33 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.33 KB

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.