ark0f / hyper-socks2 Goto Github PK
View Code? Open in Web Editor NEWA SOCKS5 connector for hyper library
License: Apache License 2.0
A SOCKS5 connector for hyper library
License: Apache License 2.0
Hey, following #13 I'd be happy to have an official release if possible.
Both authored by @ark0f is it possible to explain the differences?
What should one use this over the other etc.?
@ark0f would you accept contributions?
Hi,
I have an HTTPS server with a self-signed certificate and my goal is to create a Hyper client using a HttpsConnector<SocksConnector<HttpConnector>>
connector.
Dependencies:
hyper-socks2 = { version = "0.7.0", default-features = false, features = ["hyper-tls"] }
Then I do like this:
let https_http_connector = config.rustls_https_connector()?;
let mut http_connector = hyper::client::HttpConnector::new();
http_connector.enforce_http(false);
let socks_https_http_connector = SocksConnector {
proxy_addr: std::env::var("SOCKS5").unwrap().parse::<Uri>().unwrap(), // scheme is required by HttpConnector
auth: None,
connector: https_http_connector.clone(),
};
// create HttpsConnector ????
// inject server, CA and client certs ????
I noticed the hyper-tls
feature does not provide the with_tls
function.
But I don't know how to create HttpsConnector from the SocksConnector and inject the server, CA, and client certificate, any hints?
thank you very much
Hi, first of all thank you very much for writing this Hyper connector.
For some reasons the no_auth*
tests are randomly failing.
/hyper-socks2 master*
❯ cargo test --release http_no_auth
Finished release [optimized] target(s) in 0.08s
Running target/release/deps/hyper_socks2-4c1bce98cec5d7b5
running 2 tests
test tests::http_no_auth ... ok
test tests::http_no_auth_swap ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out
~/hyper-socks2 master*
❯ cargo test --release http_no_auth
Finished release [optimized] target(s) in 0.10s
Running target/release/deps/hyper_socks2-4c1bce98cec5d7b5
running 2 tests
test tests::http_no_auth ... ok
test tests::http_no_auth_swap ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out
~/hyper-socks2 master*
❯ cargo test --release http_no_auth
Finished release [optimized] target(s) in 0.08s
Running target/release/deps/hyper_socks2-4c1bce98cec5d7b5
running 2 tests
test tests::http_no_auth ... FAILED
test tests::http_no_auth_swap ... FAILED
failures:
---- tests::http_no_auth stdout ----
thread 'tests::http_no_auth' panicked at 'called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Socks(Response(GeneralFailure)))', src/lib.rs:239:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::http_no_auth_swap stdout ----
thread 'tests::http_no_auth_swap' panicked at 'called `Result::unwrap()` on an `Err` value: hyper::Error(Connect, Socks(Response(GeneralFailure)))', src/lib.rs:239:21
failures:
tests::http_no_auth
tests::http_no_auth_swap
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 6 filtered out
error: test failed, to rerun pass '--lib'
~/hyper-socks2 master*
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.