-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIXED JENKINS-32326] Support no_proxy environment variable #84
Conversation
Change-Id: I894e7831677ee39c37020b0fab0e6db5b290f9ca
@@ -108,6 +108,55 @@ static String indent(String s) { | |||
} | |||
|
|||
/** | |||
* Check if given URL is in the exclusion list defined by the no_proxy environment variable. | |||
* On most *NIX system wildcards are not supported but if one top domain is added, all related subdomains will also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not help much with redirects, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean HTTP 301/302 redirection? The goal of this function is only to determine whether the slave needs to use a proxy or not to reach its master. The actual selection of proxy address, redirection/connection to the proxy will be handled by other parts: Util.openURLConnection()
relies on java.net.URL.openConnection()
to do so, and the Engine does it manually: https://github.com/jenkinsci/remoting/blob/remoting-2.59/src/main/java/hudson/remoting/Engine.java#L411
I tried to mimic as much as possible the behaviour of well known tools as curl or wget which supports the no_proxy
environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it should work
In Jenkins project we commonly use System properties. IMHO it would be useful to support both options. System property could have a higher priority in this case. On the other hand, such approach may lead to security concerns |
I would also prefer to mostly rely on system properties. But previous PR #27 introduced the use of So since #27 was merged, every remoting release includes a bug which prevent a slave to connect to its master when To sum up if you must use a proxy to access internet and has configured Please have a look to the last comments of JENKINS-28289 and JENKINS-32326 for further details. |
LGTM 👍 |
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80) (cherry picked from commit c718516)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
Changes summary: Fixed issues: * [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - Make the channel reader tolerant against Socket timeouts. (jenkinsci/remoting#80) * [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - Support no_proxy environment variable. (jenkinsci/remoting#84) * [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190) - Do not invoke PingFailureAnalyzer for agent=>master ping failures. (jenkinsci/remoting#85) * [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. (jenkinsci/remoting#87) * [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). (jenkinsci/remoting#88) Enhancements: * Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. (jenkinsci/remoting#80)
https://issues.jenkins-ci.org/browse/JENKINS-32326