18 releases

0.9.1 Mar 8, 2024
0.8.0 Apr 16, 2023
0.7.0 Sep 22, 2022
0.6.0 Jan 1, 2021
0.1.4 Dec 22, 2018

#92 in #hyper

Download history 4886/week @ 2026-01-01 7849/week @ 2026-01-08 7897/week @ 2026-01-15 8989/week @ 2026-01-22 7596/week @ 2026-01-29 7351/week @ 2026-02-05 7004/week @ 2026-02-12 6610/week @ 2026-02-19 7708/week @ 2026-02-26 9464/week @ 2026-03-05 10268/week @ 2026-03-12 9045/week @ 2026-03-19 6961/week @ 2026-03-26 4724/week @ 2026-04-02 5885/week @ 2026-04-09 5772/week @ 2026-04-16

24,432 downloads per month
Used in 15 crates (9 directly)

Apache-2.0 OR MIT

13KB
236 lines

A SOCKS5 connector for hyper library

Example

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("socks5://your.socks5.proxy:1080"), // scheme is required by HttpConnector
    auth: None,
    connector,
};

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

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

Features

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

hyper-socks2

Build Status License crates.io API docs Codecov

A SOCKS5 connector for hyper library

Changelog

License

hyper-socks2 under either of:

at your option.

Dependencies

~3–20MB
~265K SLoC