Closed nicolaspernoud closed 2 years ago
I actually managed to get it working with :
lazy_static::lazy_static! {
static ref PROXY_CLIENT: ReverseProxy<TrustDnsHttpConnector> = {
ReverseProxy::new(
hyper::Client::builder().build::<_, hyper::Body>(TrustDnsResolver::default().into_http_connector()),
)
};
}
but it works only with http server proxying to http server. When trying to do tls offloading, the proxy do not converts the http/2 request to an http/1.1 request to the backend. ̀
It seems to be possible to convert the version with *Request::version_mut(&mut req) = Version::HTTP_11;
. So closing for now. But it would be nice to adapt to the version supported by the backend automatically...
Hello,
When running the example with the following dependencies :
I get an
̀_error:HyperError(hyper::Error(Connect, Custom { kind: Other, error: "Unsupported scheme http" }))
when proxying to a local http service. It seems to be related to hyper-trust-dns client, but removing the feature"https-only"
does nothing...