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 CIDR blocks in NO_PROXY env variable #2878

Open
melkouri opened this issue Jan 7, 2025 · 0 comments
Open

Support CIDR blocks in NO_PROXY env variable #2878

melkouri opened this issue Jan 7, 2025 · 0 comments

Comments

@melkouri
Copy link
Contributor

melkouri commented Jan 7, 2025

Is your feature request related to a problem? Please describe.

We have use cases where we would like to block all private IPs, hostnames using the NO_PROXY env variable. We want to specify whole CIDR blocks rather than whitelist each single IP, for example (NO_PROXY=172.16.0.0/12, 192.168.0.0/16).

Today the library only supports the NO_PROXY to be a list of single IPs (NO_PROXY=172.16.0.10, 192.168.0.10) and checks the host we're reaching against the list.

Describe the solution you'd like

In other languages

  • Golang: according to the documentation for http.ProxyFromEnvironment, the NO_PROXY environment variable does not natively support CIDR blocks. Instead, it only supports exact hostnames or IP addresses (optionally including ports).
  • C-core supports using CIDR blocks in NO_PROXY(implementation) (doc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants