omjadas / hudsucker

Intercepting HTTP/S proxy
https://crates.io/crates/hudsucker
Apache License 2.0
206 stars 35 forks source link

Cargo bech does not build #58

Closed macwilam closed 1 year ago

macwilam commented 1 year ago

Hi, i just clone the repo and cargo bench does not build.


error[E0433]: failed to resolve: use of undeclared crate or module `hyper_tls`
  --> benches/proxy.rs:94:49
   |
94 | fn native_tls_client() -> hyper::client::Client<hyper_tls::HttpsConnector<HttpConnector>> {
   |                                                 ^^^^^^^^^ use of undeclared crate or module `hyper_tls`
   |
help: there is a crate or module with a similar name
   |
94 | fn native_tls_client() -> hyper::client::Client<hyper_rustls::HttpsConnector<HttpConnector>> {
   |                                                 ~~~~~~~~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `hyper_tls`
   --> benches/proxy.rs:106:16
    |
106 |     let https: hyper_tls::HttpsConnector<HttpConnector> = (http, tls).into();
    |                ^^^^^^^^^ use of undeclared crate or module `hyper_tls`
    |
help: there is a crate or module with a similar name
    |
106 |     let https: hyper_rustls::HttpsConnector<HttpConnector> = (http, tls).into();
    |                ~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0433`.
error: could not compile `hudsucker` due to 2 previous errors

When I change cargo.toml line 62 from rustls-client = ["dep:hyper-rustls", "tokio-tungstenite/rustls-tls-webpki-roots"] to rustls-client = ["dep:hyper-rustls", "dep:hyper-tls", "tokio-tungstenite/rustls-tls-webpki-roots"]

cargo bench builds (I am not sure if it is a proper fix though as I am a begginer).

omjadas commented 1 year ago

You will want to run cargo bench --all-features