X Tutup
Skip to content

Basic http proxy configuration support#386

Merged
marcuslinke merged 1 commit into2.xfrom
issue-384
Dec 8, 2015
Merged

Basic http proxy configuration support#386
marcuslinke merged 1 commit into2.xfrom
issue-384

Conversation

@marcuslinke
Copy link
Copy Markdown
Contributor

Fix issue #384. Respects the following system variables and their https counterparts:

http.proxyHost
http.proxyPort
http.nonProxyHosts
http.proxyUser
http.proxyPassword

@KostyaSha
Copy link
Copy Markdown
Member

Not sure but seems there is no other way to set Proxy? Is it possible to make additional withProxy() for client Builder? Use case: in jenkins Proxy configuratin is handled from UI and contains in jenkins objects, so plugins must pick jenkins proxy for connections.

@marcuslinke
Copy link
Copy Markdown
Contributor Author

@KostyaSha I think this could be implemented in a separate PR later. Need to evaluate proxy support for future netty engine first to define a common API. This is just 'basic' support of http proxies variables.

@KostyaSha
Copy link
Copy Markdown
Member

Imho, better stop doing 2.x support, minimise 3.x work and release 3.x sooner. WDYT?

@marcuslinke
Copy link
Copy Markdown
Contributor Author

@KostyaSha OK, I agree. Lets merge this to 2.x so basic proxy support will do it in v2.1.3 which i will release then. What should be included in v3.0.0? I think we should provide basic v1.21 API version compatibility at least. Existing tests should run against it succesfully.

marcuslinke added a commit that referenced this pull request Dec 8, 2015
Basic http proxy configuration support
@marcuslinke marcuslinke merged commit 3de19ed into 2.x Dec 8, 2015
@garthy
Copy link
Copy Markdown

garthy commented Dec 11, 2015

This breaks if you pass unix:///var/run/docker.sock and have the proxies set. Could you check for uri type unix and not use a proxy in this case as it makes no sense?

@KostyaSha
Copy link
Copy Markdown
Member

KostyaSha commented Dec 11, 2015 via email

@garthy
Copy link
Copy Markdown

garthy commented Dec 14, 2015

I'm confused as to why should it trow an exception? You saying that if http_proxy is set you cannot use this library to connect to docker via unix:///var/run/docker.sock?

@KostyaSha
Copy link
Copy Markdown
Member

Depends on code place, for env resolution may be optional, for explicit programmatic configuration (in java code i set proxy for unix url) imho should throw. But afair nobody implemented ability to set Proxy directly for client. So my comment mostly about APIs that i would like to see finally.

@garthy
Copy link
Copy Markdown

garthy commented Dec 14, 2015

OK sorry I wasn't clear.

I agree if proxies are programaticly set and the docker protocol is unix:// then the API should throw an exception.

I was talking about global environment which should be ignored if not appropriate. Currently 2.1.3 thows an exception if the endpoint is unix:// as it tries to resolve the proxys no matter what hte endpoint protocol is It should skip the proxy code in all cases if then the protocol of the docker endpoint is unix://

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

X Tutup