Skip to content

Extend the support range for the no_proxy variable #60

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeremie-stripe
Copy link

Imported from microsoft/vscode#206622

Add wider support for the possible values that can be in no_proxy (both with values provide via configuration like a vscode setting and from the process environment variable).

Since there is no one true way to process the content of the no_proxy value, I tried to follow the most compatible approach as outlined in https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/. See also the man pages of tools like curl or wget for examples.

The PR supports the following options:

  • simple wildcard allow with *
  • equality matching of both hostnames and IP addresses (v4 + v6)
  • suffix matching for hostnames
  • IP (v4 & v6) range matching (using node's builtin BlockList class)

Tests were added.

@chrmarti
Copy link

Thanks @jeremie-stripe! The tests didn't make it, maybe the file wasn't added to Git (seeing the tsconfig.json change)?

@jeremie-stripe
Copy link
Author

🤦 , sorry about that, added

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

Successfully merging this pull request may close these issues.

2 participants