Skip to content

Visibility on proxy corruption #32

Description

@lwus

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions