Repository navigation
Conversation
|
@rhenium Thank you for the work! I like this approach, but I have two compatibility concerns. One is freezing the context, as you mentioned. net-http-persistent sets the TLS options again on the same Net::HTTP object when it reconnects (https://github.com/drbrain/net-http-persistent/blob/66bf49c4cb990b7a5b2a38006bac05da7582796d/lib/net/http/persistent.rb#L1045-L1046), so with this PR it raises FrozenError after, e.g., the server responds with The other is removing the |
Add a new test case to confirm the current behavior. Commit fa68e64 fixed the handling of certificate identity check when connecting to an IP address, but the happy path is currently not covered by the test suite.
This reverts commit ae2d83f. The commit is very incomplete and not actually usable.
Add Net::HTTP#proxy_use_ssl= to connect to the proxy server over TLS. Also enable TLS automatically when the proxy setting taken from the environment variables has the https scheme. Making HTTPS requests through an HTTPS proxy requires ruby/openssl 4.1, which supports nesting OpenSSL::SSL::SSLSocket objects.
f164431 to
1623842
Compare
|
Thanks for the review! I wasn't aware of these issues. I've rebased this branch to exclude #303, since it's not ready yet. The idea was to make the SSL settings for the proxy connection configurable without duplicating another ~15 attributes just for the proxy. If we expose I've restored the I didn't choose to add warnings this time, but I think |
Fixes #212
#55 was merged while the code was still unfinished. As pointed out in the linked issue above, it current works for neither HTTP requests nor HTTPS requests.
This PR attempts to actually implement it.
(First two commits are from #303)
Add
Net::HTTP#proxy_use_ssl=to connect to the proxy server over TLS, andNet::HTTP#proxy_ssl_contextto configure the TLS settings.Also enable TLS automatically when the proxy setting taken from the environment variables has the https scheme.
Making HTTPS requests through an HTTPS proxy requires ruby/openssl 4.1, which supports nesting
OpenSSL::SSL::SSLSocketobjects.This PR depends on ruby/openssl#736, which should be merged soon.