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
Openshift Client ignores NO_PROXY setting #4247
Comments
The implementation Line 72 in 10e9f18
|
In that case, I would really appreciate an error msg. It appears to me as if the code is passing an IP that could not be parsed along to another component to let it fail there? I think an unparsable proxy ip should result in an error that can be associated with the proxy configuration. If the unparsable proxy string is passed to the level of concern of http connections then ofc I get an error message that is related to that layer: "read timed out", but that makes it hard to find out what's actually wrong.
|
The biggest issue here is there's no docs defining the expected behavior. As implemented it would read something like: noProxy - a list of addresses of hosts for which using the proxy is disabled. If an IP address is specified, it may include subnet masks. If a host name is specified the proxy won't be used if that name appears anywhere in the requested host name - there is no support for wildcard matches.
I think you mean checking for non-url characters, so in this case * would cause an exception. That's a possibility. As would be supporting glob matching - that would be backwards compatible. Full regex would not. In any case I also wonder about using host.contains - searching anywhere in the host name doesn't seem quite right. @rohanKanojia @manusa what do you vote for expected behavior here? |
The NO_PROXY env var support was added in #209 to fix an issue with Fabric8 Maven Plugin (fabric8io/fabric8#5178). The spec was taken from http://www.gnu.org/software/wget/manual/html_node/Proxies.html
However, the GNU emacs spec does support wildcards https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html
The one for OpenShift doesn't accept wildcard characters either. Regarding the current implementation, I think it's fine and I wouldn't overcomplicate it. However, I think that the line if (host.contains(noProxy)) { should be changed to if (host.endsWith(noProxy)) { or even something a little bit more involved that actually checks for subdomains if expressed as
Yes, this would improve the usability. |
…abric8io#4247) + Modify NO_PROXY check to use `.endsWith` instead of `.contains` to better match host name. + Add a check to throw an Exception if any of NO_PROXY contains `*` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…abric8io#4247) + Modify NO_PROXY check to use `.endsWith` instead of `.contains` to better match host name. + Add a check to throw an Exception if any of NO_PROXY contains `*` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
have `@EqualsAndHashCode(callSuper = true)` (fabric8io#4247) CustomResource classes generated in extra-annotations mode by Java generator should have `@EqualsAndHashCode` annotation configured with `callSuper = true` in case class extends another class. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…abric8io#4247) + Modify NO_PROXY check to use `.endsWith` instead of `.contains` to better match host name. + Add a check to throw an Exception if any of NO_PROXY contains `*` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…abric8io#4247) + Modify NO_PROXY check to use `.endsWith` instead of `.contains` to better match host name. + Add a check to throw an Exception if any of NO_PROXY contains `*` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…4247) + Modify NO_PROXY check to use `.endsWith` instead of `.contains` to better match host name. + Add a check to throw an Exception if any of NO_PROXY contains `*` Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Describe the bug
The ConfigBuilder ignores .withNoProxy() Setting. I must set the HttpProxy to null in order to connect to my PaaS.
Fabric8 Kubernetes Client version
6.0.0-RC1
Steps to reproduce
Does not work:
Weird workaround that works:
Expected behavior
This should work / not be ignored.
Runtime
OpenShift
Kubernetes API Server version
other (please specify in additional context)
Environment
Windows
Fabric8 Kubernetes Client Logs
No response
Additional context
Kubernetes API Server version: v1.21.11+6b3cbdd
The text was updated successfully, but these errors were encountered: