18 个版本

0.9.1 2024 年 3 月 8 日
0.8.0 2023 年 4 月 16 日
0.7.0 2022 年 9 月 22 日
0.6.0 2021 年 1 月 1 日
0.1.4 2018 年 12 月 22 日

#6 in #hyper-client

Download history · Rust 包仓库 3776/week @ 2024-04-08 · Rust 包仓库 2201/week @ 2024-04-15 · Rust 包仓库 1929/week @ 2024-04-22 · Rust 包仓库 4372/week @ 2024-04-29 · Rust 包仓库 4679/week @ 2024-05-06 · Rust 包仓库 5253/week @ 2024-05-13 · Rust 包仓库 4759/week @ 2024-05-20 · Rust 包仓库 6125/week @ 2024-05-27 · Rust 包仓库 5486/week @ 2024-06-03 · Rust 包仓库 5867/week @ 2024-06-10 · Rust 包仓库 5465/week @ 2024-06-17 · Rust 包仓库 4591/week @ 2024-06-24 · Rust 包仓库 2239/week @ 2024-07-01 · Rust 包仓库 4961/week @ 2024-07-08 · Rust 包仓库 5113/week @ 2024-07-15 · Rust 包仓库 5098/week @ 2024-07-22 · Rust 包仓库

17,491 每月下载量
用于 10 个 (6 直接) crates

Apache-2.0 OR MIT

13KB
236

hyper-socks2

Build Status License crates.io API docs Codecov

hyper 库的 SOCKS5 连接器

变更日志

许可证

hyper-socks2 在以下任一许可下

根据您的选择。


lib.rs:

hyper 库的 SOCKS5 连接器

示例

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);

功能

  • tls 功能默认启用。它通过 hyper-tls 添加 TLS 支持。
  • rustls 功能通过 hyper-rustls 添加 TLS 支持。

依赖项

~5–17MB
~236K SLoC