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

Ensure Proxy Support #42

Closed
dshafik opened this issue Mar 22, 2018 · 6 comments
Closed

Ensure Proxy Support #42

dshafik opened this issue Mar 22, 2018 · 6 comments

Comments

@dshafik
Copy link
Contributor

dshafik commented Mar 22, 2018

Ensure that existing packages support the HTTP_PROXY environment variable, and document that this is requirement for all packages.

Golang's net/http and Python's requests support this by default, I am unsure about Node/JS.

@francescoc-vf
Copy link

Thanks for your prompt answer but proxy support via environment variable does not satisfy my request in #41.

Main target for this utility is supporting DevOps environments; meaning jumpservers, buildservers, monitoring servers.

While an environment variable is an acceptable solution on a personal workstation it's not recommended and usually forbidden in these scenarios.

There are also many other concerns about security and network complexity which really mandates a command line switch.

I'd suggest to consider that all other cli tools in this class (curl, wget, aria, httpie) does support it, usually on top of the environment variable.
Otherwise the value of this tool will be limited to a few very specific use cases.

@dshafik
Copy link
Contributor Author

dshafik commented Mar 22, 2018

@francescoc-vf due to the architecture of the CLI, environment variables are the primary way of communicating with the package commands - this means adding a global proxy flag would likely just set the HTTP_PROXY environment variable before forking off the child process.

If this is acceptable, that is fine.

@francescoc-vf
Copy link

Sorry my bad, didn't explain myself properly :)
There are some limitations where you are not in control of the environment.
Setting up a proxy through a variable is not acceptable while it's "tolerated" via command line switch.

@dshafik
Copy link
Contributor Author

dshafik commented Mar 23, 2018

@francescoc-vf I understand, I'll look to add this flag, which will just set the environment variable for sub-commands.

@dshafik
Copy link
Contributor Author

dshafik commented Mar 23, 2018

@khunter has confirmed that Node packages do support HTTP_PROXY.

@rajiv
Copy link
Member

rajiv commented Mar 23, 2018

ruby plugins which use the akamai/AkamaiOPEN-edgegrid-ruby gem (and consequently Net::HTTP in ruby) support http_proxy, and print this warning with HTTP_PROXY:

The environment variable HTTP_PROXY is discouraged.  Use http_proxy.

piotrpio added a commit that referenced this issue Mar 16, 2021
* commit '33d4074139ca4033c61cab722a0b5130d87cb860':
  [TFP-648] Return error on invalid response status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants