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
feat(request): add noProxy setting for configuration (#5048) #5757
base: master
Are you sure you want to change the base?
Conversation
|
|
I got this problem a few days ago, so I sympathize 😄 A workaround is to set
As for your PR, I think ideally the best would be to support |
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.
I think in its current state this diff is doing too many things (we should try to add it as a command line switch), but I'm open to discuss it to solve this elegantly.
To clarify, this PR should support adding a configuration like My change just ensures that this "no-proxy" setting is loaded from configuration file and checks if the target url is covered by this no-proxy setting. The new file proxy-exclusion.js is mainly the same implementation as the implementation in the underlying library is using to exclude a url from proxy. (https://github.com/request/request/blob/master/lib/getProxyFromURI.js) Because request library just has a "proxy" config option but no "no-proxy" option, I see the only way to suppress proxy by passing an empty string to the request library. (as it was already done before if proxy was set to false in yarn) This code is needed also in case of additional command line options I think. |
Any progress on this? |
what is the current status ? We don't like to ply with env var as we're on ayarn workspace where a lot of sub commands will try to access to the nexus. |
Any news ? |
Any progress ? @glausmichael |
Summary
No
Proxy exclusion is currently not possible in configuration file. If proxy is defined in configuration file, no proxy exclusion can therefore be specified at the moment, because environment variable is not taken into account in this case.
Test plan
Added test 'RequestManager.request with no_proxy option' to check both http and https behavior with proxy exclusion.
Tested with corporate proxy by calling yarn install with local repository.
I had to adapt the test 'RequestManager.execute timeout error with maxRetryAttempts=1' because the string port is not a valid port for a url.