[go: up one dir, main page]

hyper-socks2 0.4.0

A SOCKS5 connector for hyper library
Documentation
hyper-socks2-0.4.0 has been yanked.

A SOCKS5 connector for hyper library

Example

# use std::error::Error;
# fn hidden() -> Result<(), Box<dyn Error>> {
use hyper::{Body, Uri};
use hyper::client::{Client, HttpConnector};
use hyper_socks2::SocksConnector;

let mut connector = HttpConnector::new();
connector.enforce_http(false);
let proxy = SocksConnector {
proxy_addr: Uri::from_static("your.socks5.proxy:1080"),
auth: None,
connector,
};

// with TLS support
let proxy = proxy.with_tls()?;

let client = Client::builder().build::<_, Body>(proxy);

# Ok(())
# }

Features

  • tls feature is enabled by default. It adds TLS support using hyper-tls.