Skip to content

LOG-9383: Document NO_PROXY domain matching behavior difference between Vector and Go#3281

Open
vparfonov wants to merge 1 commit into
openshift:masterfrom
vparfonov:log9383
Open

LOG-9383: Document NO_PROXY domain matching behavior difference between Vector and Go#3281
vparfonov wants to merge 1 commit into
openshift:masterfrom
vparfonov:log9383

Conversation

@vparfonov
Copy link
Copy Markdown
Contributor

@vparfonov vparfonov commented May 18, 2026

Description

Add a "Known Limitation" section documenting that Vector's no-proxy crate handles plain domain entries (e.g., example.com) differently than Go's httpproxy package. Plain domains in Vector match exactly, not as a prefix for subdomains. Include a comparison table and workaround: use both the domain and leading-dot form (e.g., apps.example.com,.apps.example.com) to match both the domain and its subdomains.

This is tracked upstream at https://github.com/jdrouet/no-proxy

/cc @Clee2691
/assign @jcantrill @r2d2rnd

Links

Summary by CodeRabbit

  • Documentation
    • Added documentation about a known limitation with NO_PROXY domain matching behavior in HTTP proxy configurations.
    • Includes comparison showing how plain domains and leading-dot entries match differently.
    • Provides a workaround: specify both plain domain and leading-dot form to ensure correct proxy bypass behavior.

…en Vector and Go

Add a "Known Limitation" section documenting that Vector's no-proxy crate handles
plain domain entries (e.g., example.com) differently than Go's httpproxy package.
Plain domains in Vector match exactly, not as a prefix for subdomains. Include a
comparison table and workaround: use both the domain and leading-dot form
(e.g., apps.example.com,.apps.example.com) to match both the domain and its
subdomains.

This is tracked upstream at https://github.com/jdrouet/no-proxy

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 18, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 18, 2026

@vparfonov: This pull request references LOG-9383 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.8.0" version, but no target version was set.

Details

In response to this:

Description

Add a "Known Limitation" section documenting that Vector's no-proxy crate handles plain domain entries (e.g., example.com) differently than Go's httpproxy package. Plain domains in Vector match exactly, not as a prefix for subdomains. Include a comparison table and workaround: use both the domain and leading-dot form (e.g., apps.example.com,.apps.example.com) to match both the domain and its subdomains.

This is tracked upstream at https://github.com/jdrouet/no-proxy

/cc @Clee2691
/assign @jcantrill @r2d2rnd

Links

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

This PR adds documentation explaining that Vector's no-proxy Rust crate evaluates NO_PROXY entries differently from Go/OpenShift implementations. A new "Known Limitation" section includes a comparison table of matching behavior and instructs users to configure both plain domain and leading-dot forms to ensure proxy bypass works as expected.

Changes

HTTP Proxy Support Documentation

Layer / File(s) Summary
Known limitation and workaround documentation
docs/features/logforwarding/outputs/http-proxy-support.adoc
Adds a "Known Limitation: NO_PROXY Domain Matching Behavior" section that documents differences between Vector's no-proxy crate and OpenShift/Go httpproxy implementations, provides a comparison table showing how each handles plain domains vs. leading-dot entries, and includes a workaround instructing users to specify both forms (e.g., apps.example.com,.apps.example.com).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A rabbit hops through docs so clear,
Explaining NO_PROXY without fear,
When subdomains fail to bypass the gate,
Configure both forms—that's the weight!
One plain, one dotted, a workaround neat,
Vector and OpenShift, now they meet. 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: documenting the NO_PROXY domain matching behavior difference between Vector and Go.
Description check ✅ Passed The description includes all mandatory sections with substantive content: a clear summary of the change with context, linked JIRA issue, assigned reviewers and approvers, and reference to upstream tracking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from Clee2691 and jcantrill May 18, 2026 13:33
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/features/logforwarding/outputs/http-proxy-support.adoc (1)

221-222: ⚡ Quick win

Consider adding the upstream tracking link.

The PR description mentions upstream tracking at https://github.com/jdrouet/no-proxy, but the NOTE doesn't include this link. Adding it would help users track progress on the upstream fix.

📝 Suggested enhancement
-NOTE: This is a known upstream issue in the `no-proxy` Rust crate used by Vector. Once the upstream fix is released and adopted by Vector, plain domain entries will match subdomains as expected.
+NOTE: This is a known upstream issue in the `no-proxy` Rust crate used by Vector (tracked at https://github.com/jdrouet/no-proxy). Once the upstream fix is released and adopted by Vector, plain domain entries will match subdomains as expected.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/features/logforwarding/outputs/http-proxy-support.adoc` around lines 221
- 222, Update the NOTE paragraph that mentions the upstream issue in the
`no-proxy` Rust crate so it includes the upstream tracking link
(https://github.com/jdrouet/no-proxy) — locate the NOTE text "This is a known
upstream issue in the `no-proxy` Rust crate used by Vector..." and append or
embed the GitHub URL so users can directly follow the upstream PR/issue.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/features/logforwarding/outputs/http-proxy-support.adoc`:
- Around line 172-199: The "Known Limitation: NO_PROXY Domain Matching Behavior"
section incorrectly claims the Rust no-proxy crate treats plain domains (e.g.,
example.com) as exact-match-only; verify the no-proxy crate behavior against its
docs/source and then update or remove this section accordingly: if the crate
treats example.com and .example.com equivalently (matching domain and subdomains
like Go's httpproxy), delete or rewrite the table rows and the workaround text
(the paragraph and lines referenced as the workaround) to reflect parity with
Go's behavior, and remove any admonitions or workaround instructions that assume
differing behavior; keep references to the no-proxy crate and Go's httpproxy in
the explanation so readers know what was verified.

---

Nitpick comments:
In `@docs/features/logforwarding/outputs/http-proxy-support.adoc`:
- Around line 221-222: Update the NOTE paragraph that mentions the upstream
issue in the `no-proxy` Rust crate so it includes the upstream tracking link
(https://github.com/jdrouet/no-proxy) — locate the NOTE text "This is a known
upstream issue in the `no-proxy` Rust crate used by Vector..." and append or
embed the GitHub URL so users can directly follow the upstream PR/issue.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fef79483-d692-49fa-a84d-2a7b19e6bf95

📥 Commits

Reviewing files that changed from the base of the PR and between e6cb82d and 86e9890.

📒 Files selected for processing (1)
  • docs/features/logforwarding/outputs/http-proxy-support.adoc

Comment on lines +172 to +199
== Known Limitation: NO_PROXY Domain Matching Behavior

The Vector log collector uses a Rust library (`no-proxy` crate) to evaluate `NO_PROXY` entries. This library handles plain domain entries differently than Go's `httpproxy` package used by OpenShift and most Kubernetes components:

[cols="1,2,2",options="header"]
|===
| NO_PROXY Entry | Go (OpenShift behavior) | Vector (collector behavior)

| `example.com`
| Matches `example.com` **and all subdomains** (e.g., `sub.example.com`)
| Matches `example.com` **only** (exact match)

| `.example.com`
| Matches subdomains only (e.g., `sub.example.com`), **not** `example.com` itself
| Matches subdomains only (e.g., `sub.example.com`), **not** `example.com` itself

| `10.0.0.1`
| Exact IP match
| Exact IP match

| `10.0.0.0/24`
| CIDR range match
| CIDR range match

| `*`
| Matches all hosts
| Matches all hosts
|===
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Rust no-proxy crate NO_PROXY domain matching behavior for plain domains

💡 Result:

In the context of Rust crates that implement NO_PROXY parsing (such as the popular no-proxy crate [1] or the NoProxy implementation found in reqwest [2]), the matching behavior for plain domains is designed to be inclusive of subdomains. Specifically, for these implementations: 1. Domain Equivalence: A plain domain (e.g., example.com) and its variant with a leading dot (e.g., .example.com) are treated as equivalent [3][4][2]. 2. Subdomain Matching: Both example.com and .example.com will match the domain itself as well as all of its subdomains (e.g., sub.example.com, a.b.example.com) [3][4][2]. This behavior is consistent with common expectations for NO_PROXY handling in many modern libraries, where the goal is to simplify configuration by ensuring that a single entry covers a domain and its entire hierarchy [3][2]. If you are using a specific crate, you can verify this behavior by checking its documentation for NoProxy::from_string or NoProxy::from_env, which typically outlines these rules explicitly [3][4][2]. For example, the no-proxy crate documentation confirms that it parses and evaluates these configurations to match both the specified domain and its subdomains [1][5].

Citations:


🌐 Web query:

Go httpproxy package NO_PROXY domain matching behavior for plain domains

💡 Result:

In Go's net/http (via the golang.org/x/net/http/httpproxy package), the NO_PROXY environment variable defines a comma-separated list of hosts that should be excluded from proxying [1][2]. The matching behavior for plain domain names is as follows: 1. Domain Matching: A plain domain name (e.g., example.com) matches that specific domain and all of its subdomains [1][3]. For example, example.com will match both example.com and sub.example.com [1][3]. 2. Leading Dot: If a domain name is specified with a leading dot (e.g., .example.com), it matches subdomains only, not the domain itself [1][3]. For example, .example.com matches sub.example.com but does not match example.com [1][3]. 3. Implementation Detail: Internally, the package processes these rules by checking if the request host ends with the specified domain string [1][3]. If a domain is provided without a leading dot, the implementation effectively treats it as a match for the host itself or any host that has the specified domain as a suffix [1][3]. 4. Special Case: A single asterisk (*) in the NO_PROXY list indicates that no proxying should be performed for any request [1][3]. It is important to note that NO_PROXY matching is performed against the host portion of the request URL [1][3]. The package does not perform DNS lookups to resolve hostnames to IP addresses when evaluating these rules [4]. If you need to exclude IP addresses, you should provide them directly or use CIDR notation, which the package also supports [1][5].

Citations:


CRITICAL: The Rust no-proxy crate behavior claim is incorrect.

The comparison table states that Vector (using Rust no-proxy crate) treats plain domains like example.com as exact-match-only, differing from Go's behavior. However, according to the no-proxy crate documentation, example.com and .example.com are treated as equivalent and both match the domain and all subdomains—identical to Go's httpproxy behavior. This means the documented "Known Limitation" does not actually exist.

The incorrect claim undermines the entire section and the workaround guidance (lines 203-220). If Vector and Go handle plain domains identically, the workaround may be unnecessary. Remove or correct this section based on actual library behavior verification.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/features/logforwarding/outputs/http-proxy-support.adoc` around lines 172
- 199, The "Known Limitation: NO_PROXY Domain Matching Behavior" section
incorrectly claims the Rust no-proxy crate treats plain domains (e.g.,
example.com) as exact-match-only; verify the no-proxy crate behavior against its
docs/source and then update or remove this section accordingly: if the crate
treats example.com and .example.com equivalently (matching domain and subdomains
like Go's httpproxy), delete or rewrite the table rows and the workaround text
(the paragraph and lines referenced as the workaround) to reflect parity with
Go's behavior, and remove any admonitions or workaround instructions that assume
differing behavior; keep references to the no-proxy crate and Go's httpproxy in
the explanation so readers know what was verified.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vparfonov if this is correct then that means there is either a documentation error in the crate or an implementation error. Let's figure out which is correct

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream no-proxy crate v0.3.6
File: src/lib.rs, line 111 in jdrouet/no-proxy

Self::Plain(source) => source == value

This is exact match only, no subdomain matching.
So "Known Limitation" is correct at the moment

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

@vparfonov: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jcantrill
Copy link
Copy Markdown
Contributor

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 18, 2026
@jcantrill
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 18, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill, vparfonov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. release/6.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants