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

ProxySetting.FORCED should unset environment variables related to proxy settings #153

Closed
deepy opened this issue Mar 10, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@deepy
Copy link
Member

deepy commented Mar 10, 2021

Currently FORCED will overwrite some proxy settings and this might end up being confusing if other configuration has been set, so to get the expected result I am thinking we should unset any environment variable that could affect proxy settings before setting ours.

We currently already have a list of known variables

// These are the environment variables that HTTPing applications checks, proxy is on and off.
// FTP skipped in hopes of a better future.
private val proxyVariables = listOf(
"HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY", "PROXY"
)
// And since npm also takes settings in the form of environment variables with the
// NPM_CONFIG_<setting> format, we should check those. Hopefully nobody does this.
private val npmProxyVariables = listOf(
"NPM_CONFIG_PROXY", "NPM_CONFIG_HTTPS-PROXY", "NPM_CONFIG_NOPROXY"
)

@deepy deepy added the proposal label Mar 10, 2021
@bsautel
Copy link
Contributor

bsautel commented Mar 18, 2021

That makes sense. Either we use the configuration which is present in the environment, either we use our configuration, but not a mix of both of them that can lead to strange behaviors.

@deepy deepy added enhancement New feature or request and removed proposal labels Mar 24, 2021
@deepy deepy added this to the 4.0 milestone Oct 11, 2021
@deepy deepy closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants