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

protobuf-ts/protoc does not respect proxy environment variables #507

Open
mikonse opened this issue Apr 3, 2023 · 1 comment
Open

protobuf-ts/protoc does not respect proxy environment variables #507

mikonse opened this issue Apr 3, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@mikonse
Copy link
Contributor

mikonse commented Apr 3, 2023

When using the helper package @protobuf-ts/protoc to install the protoc compiler in an environment where no direct internet access is available but a proxy is configured through the environment variables HTTP_PROXY and or HTTPS_PROXY the http request to download the latest release from github will hang until it fails with a timeout (which makes sense as it cannot connect to github without a proxy).

It would be quite useful if the automatic downloading of the protobuf compiler would work behind a proxy as well.

Unfortunately it seems that the node https and http core modules do not respect the proxy environment variables so to implement this feature there are two options:

  • use a different request library
  • use a library which creates a http.Agent which respects the proxy env and pass that to https.get

A nice summary can also be found in this stackoverflow thread

@timostamm timostamm added the help wanted Extra attention is needed label Apr 3, 2023
@timostamm
Copy link
Owner

Supporting the HTTP_PROXY variables is a good call. Happy to accept a contribution, but an implementation that does not add dependencies would be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants