use zeloxy::{Proxy, ProxyProtocol, ProxyResult, ProxyStream};
#[tokio::main]
async fn main() -> ProxyResult<()> {
let proxy = Proxy::new("91.132.92.231:80", ProxyProtocol::Http);
let stream = ProxyStream::new(proxy);
stream.connect("example.com", 80).await?;
let buf = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n".as_bytes();
stream.write(buf).await?;
let mut resp = Vec::new();
stream.read_to_end(&mut resp).await?;
println!("Ответ: {}", String::from_utf8_lossy(&resp));
Ok(())
}