Always use HTTP to connect to proxy even when proxying HTTPS #586
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The intention of the current implementation seems to be to have the
normal proxy settings accomplish the same results with docker-java as
they would in java in general. I think the one accidental divergence
from that is that for the HTTPS case setting https.{proxy,port} would
normally still use HTTP but in this case the code is- I think
unintentionally- switching to the proxy connection to HTTPS.
This change makes it so it corresponds better with how the java proxy
properties work as well. Even when proxying HTTPS the connection to
the actually proxy is done over HTTP and it makes a CONNECT call to
stream the HTTPS over.
Most proxies are still used via HTTP and for better or worse this is
the assumption built into the java proxy configuration which
docker-java is using. The apache client is more flexible and perhaps
the docker-java configuration should be too but I'd like to argue that
until then that the docker-java match the behavior of java.
Also this allows me to use docker-java through the corporate proxy
when proxying HTTPS. Otherwise HTTP works but HTTPS fails since the
proxy is not configured with HTTPS.
This change is