Registry / http-client / hyper-socks2

hyper-socks2

JSON →
library0.9.1rscratesunverified

A SOCKS5 connector for the hyper library.

# Cargo.toml [dependencies] hyper-socks2 = "0.9.1"
INSTALL
IMPORT
SIG · HYPER-SOCKS2
H
hyper-socks2
http-clientrustv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SocksConnector
use hyper_socks2::SocksConnector;

Create an HTTP client that routes through a SOCKS5 proxy.

use hyper_socks2::SocksConnector; use hyper::Client; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let connector = SocksConnector::new("127.0.0.1:1080".parse()?); let client = Client::builder().build(connector); let resp = client.get("http://example.com".parse()?).await?; println!("Response: {}", resp.status()); Ok(()) }
Debug
Known issues
gotchaRequires a Tokio runtime for async execution.
fix
Add tokio as a dependency and use #[tokio::main] or similar.
affects: >=0.9.0
Upgrade
Version history
0.9.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
hyper-socks2 — cargo add hyper-socks2 · libregistry