reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

Add HTTPS Proxy tests

Open seanmonstar opened this issue 6 years ago • 1 comments

There is basically 4 combinations of proxy environments that should have tests, so we don't regress:

  • [x] HTTP site through HTTP proxy
  • [ ] HTTP site through HTTPS proxy
  • [ ] HTTPS site through HTTP proxy
  • [ ] HTTPS site through HTTPS proxy

Notably, when the site is HTTP, it should just send a single request with an absolute-form URI. When it is HTTPS, it should tunnel with a CONNECT request first. HTTPS-over-HTTPS should have negotiated TLS two times, once for the proxy and then another time over the tunneled connection to the destination.

seanmonstar avatar Jan 08 '19 20:01 seanmonstar

Seems to me that "* site through HTTPS proxy" will fail because no attempt is made to establish a tls session between client and proxy before making another tls session between client and target.

So the rustdoc example won't actually proxy: https://github.com/seanmonstar/reqwest/blob/05996d80b77e8e1af57d3d642969b53772a1df44/src/lib.rs#L131-L142 Yes, one can make a new Proxy with an https string but attempting to proxy to it will actually fail

DanGould avatar Feb 04 '24 17:02 DanGould