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.