http-client: support CIDR in no_proxy - #2495
Open
silverwind wants to merge 3 commits into
Open
silverwind wants to merge 3 commits into
silverwind wants to merge 3 commits into
Conversation
Entries like 10.0.0.0/8 were compared as plain strings, so requests to IP hosts in such ranges went through the proxy even though curl, Go and most other clients bypass it. Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Reject malformed CIDR entries containing extra path components.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds IPv4 and IPv6 CIDR support to no_proxy handling in the HTTP client.
Changes:
- Uses Node’s
BlockListfor CIDR matching. - Adds tests for valid and invalid CIDR entries.
File summaries
| File | Description |
|---|---|
packages/http-client/src/proxy.ts |
Implements CIDR-based proxy bypass matching. |
packages/http-client/__tests__/proxy.test.ts |
Tests IPv4/IPv6 CIDR behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
An entry like 10.0.0.0/8/x was matched as 10.0.0.0/8. Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
silverwind
commented
Sep 15, 2026
no_proxyno_proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support CIDR syntax in the
no_proxyparsing ofhttp-client.The best "spec" on this topic is https://about.gitlab.com/blog/we-need-to-talk-no-proxy/ which shows the go and ruby parsers and probably others support CIDR in
no_proxyand I have a specific use case where this broke when having10.0.0.0/8insideno_proxy.Created with assistance of Claude Opus 5 and GPT 6 Astra.