Skip to content
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

Support corp http proxies #115

Closed
alexeagle opened this issue Jan 31, 2020 · 3 comments
Closed

Support corp http proxies #115

alexeagle opened this issue Jan 31, 2020 · 3 comments

Comments

@alexeagle
Copy link
Contributor

Some users are in a corp network where all http traffic has to go through a proxy. bazelisk relies on http to talk to google storage API, github search API, and to download binaries.

It seems like at least support for the HTTP[S]_PROXY environment variables would be straightforward to add: https://golang.org/pkg/net/http/#ProxyFromEnvironment

If/when we have an npm package for bazelisk (#114) we should also read values from .npmrc to find the proxy config (https://docs.npmjs.com/using-npm/config#https-proxy) and pass that to the Go program. We can't tear down the @bazel/bazel npm package until this feature lands, because some users rely on the npm proxy setting to get Bazel onto their dev machines today.

@alexeagle
Copy link
Contributor Author

Note, for the npm case, puppeteer is a good example of an npm program that wants to download additional binaries (headless chrome) and therefore has logic to find the proxy config (https://github.com/puppeteer/puppeteer/blob/0d243b7a0f4026b2f832abbdbca9633744209d16/install.js#L54-L64)

/cc @josephperrott

@coeuvre
Copy link
Member

coeuvre commented Jul 3, 2020

It seems Go's http package handle HTTP_PROXY/HTTPS_PROXY by default.

I tested on my Mac that bazelisk will use my HTTP_PROXY/HTTPS_PROXY values.

@alexeagle
Copy link
Contributor Author

Oh that's great, I didn't test it myself so there is probably no issue here.

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

No branches or pull requests

2 participants