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

HTTPS doesn't work with proxy #3

Closed
zaari opened this issue Feb 16, 2017 · 2 comments
Closed

HTTPS doesn't work with proxy #3

zaari opened this issue Feb 16, 2017 · 2 comments

Comments

@zaari
Copy link

zaari commented Feb 16, 2017

How do you use hyper-rustls with an http proxy? The following results an error.

let ssl = TlsClient::new();
let connector = HttpsConnector::new(ssl);
let proxy_config = ProxyConfig::new("http", host, port, connector, ssl);
let client = Client::with_proxy_config(proxy_config);

The error message is:

the trait bound hyper_rustls::TlsClient: hyper::net::SslClient<hyper::net::HttpsStream<hyper_rustls::WrappedStream>> is not satisfied

@ctz
Copy link
Member

ctz commented Feb 19, 2017

connector here gets you to the proxy, then ssl is used through the proxy to tunnel HTTPS requests. I've updated examples/client.rs to show this working.

@zaari
Copy link
Author

zaari commented Feb 19, 2017

That's a good example which solved my problem. Thank you.

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

2 participants