Crates.io | async-socks5 |
lib.rs | async-socks5 |
version | 0.6.0 |
source | src |
created_at | 2019-12-21 14:04:39.329336 |
updated_at | 2024-02-25 23:48:57.653239 |
description | An async/.await SOCKS5 implementation |
homepage | |
repository | https://github.com/ark0f/async-socks5 |
max_upload_size | |
id | 191207 |
size | 41,696 |
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?;
}
async-socks5 under either of:
at your option.