Skip to content

Always use HTTP to connect to proxy even when proxying HTTPS#586

Merged
marcuslinke merged 1 commit intodocker-java:masterfrom
loganbruns:always_use_http_to_contact_proxy_master
May 27, 2016
Merged

Always use HTTP to connect to proxy even when proxying HTTPS#586
marcuslinke merged 1 commit intodocker-java:masterfrom
loganbruns:always_use_http_to_contact_proxy_master

Conversation

@loganbruns
Copy link
Copy Markdown
Contributor

@loganbruns loganbruns commented May 27, 2016

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 Reviewable

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.
@marcuslinke marcuslinke merged commit 8415919 into docker-java:master May 27, 2016
@marcuslinke
Copy link
Copy Markdown
Contributor

@loganbruns Thanks for clarifying and fixing!

@marcuslinke marcuslinke added this to the 3.0.0-RC6 milestone May 27, 2016
panuse pushed a commit to TuKangTech/docker-java that referenced this pull request Aug 20, 2017
…_contact_proxy_master

Always use HTTP to connect to proxy even when proxying HTTPS
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

Successfully merging this pull request may close these issues.

3 participants