ayush00git commented on issue #282: URL: https://github.com/apache/openserverless/issues/282#issuecomment-6496004297
### Proposed fix: (in short the fix is simply to append the local `apihost` to `NO_PROXY`.) 1. In `main.go`, before the first network call, read the configured apihost from `OPS_APIHOST`, the config (`OPERATOR_CONFIG_APIHOST`) and `~/.wskprops`, plus the argument of `ops -login <apihost>`. 2. if a proxy variable is set and the apihost is local (taht could be literal `localhost`, or resolves to a loopback / private / link-local address), append the bare host name to both `NO_PROXY` and `no_proxy`, merging with whatever the user already has. 3. remote apihosts are left alone so they keep going through the proxy. 4. go reads the proxy environment once per process, so we need to call them early and again after the config env vars are loaded. subdomains such as `s3.<apihost>` and `stream.<apihost>` used by `ops ide` are covered automatically, since go, bun and curl match `NO_PROXY` entries against subdomains too. I have this working locally (old vs patched binary, same proxy: old fails as above, patched deploys, and `ops -update` still shows `CONNECT github.com:443` on the proxy). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
