Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility on proxy corruption #32

Open
lwus opened this issue May 13, 2022 · 0 comments
Open

Visibility on proxy corruption #32

lwus opened this issue May 13, 2022 · 0 comments

Comments

@lwus
Copy link

lwus commented May 13, 2022

Is there a way to diagnose where a proxy connector might be introducing corruption when working with TLS? I'm running the example http_proxy and am able to successfully connect through reqwest but not this crate. My setup is

let mut http = hyper::client::connect::HttpConnector::new();
http.enforce_http(false);

let proxy_uri = "https://127.0.0.1:8100".to_string();
let mut proxy = hyper_proxy::Proxy::new(
    hyper_proxy::Intercept::All,
    proxy_uri.parse::<http::Uri>()
        .map_err(|err| Error::InvalidUri(proxy_uri, err.to_string()))?,
);
proxy.set_header(
    http::header::HeaderName::from_static("proxy-connection"),
    http::header::HeaderValue::from_static("Keep-Alive"),
);
endpoint.connect_with_connector(
    hyper_proxy::ProxyConnector::from_proxy(http, proxy)?).await.unwrap()

where endpoint is a tonic Channel. The handshake seems to kick off but then a tonic::transport::Error(Transport, hyper::Error(Connect, Custom { kind: InvalidData, error: CorruptMessage })) is returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant