[GH-ISSUE #7665] NO_PROXY: unbracketed IPv6 entry is truncated at its last colon and never matches #3321

Open
opened 2026-11-03 04:07:31 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ClickingMaster on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7665

🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Where: crates/horizon-port-pack/src/net.rs, excluded() (the NO_PROXY matcher).

Wrong: the port-stripping step (entry.rfind(':')) is applied to every NO_PROXY entry. An unbracketed IPv6 literal such as 2001:db8::1 (the form curl and most tools accept in NO_PROXY) is cut at its last colon to 2001:db8:, so it never matches the host [2001:db8::1]. The download then goes through the proxy although the player excluded it.

Expected: excluded("[2001:db8::1]", "2001:db8::1") is true. Actual: false. Bracketed entries with a port ([2001:db8::1]:8080) must keep working.

Reference: curl/Go NO_PROXY handling treat an entry with more than one colon and no brackets as a bare IPv6 address, not host:port.

Originally created by @ClickingMaster on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7665 > 🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. **Where:** `crates/horizon-port-pack/src/net.rs`, `excluded()` (the `NO_PROXY` matcher). **Wrong:** the port-stripping step (`entry.rfind(':')`) is applied to every `NO_PROXY` entry. An unbracketed IPv6 literal such as `2001:db8::1` (the form curl and most tools accept in `NO_PROXY`) is cut at its last colon to `2001:db8:`, so it never matches the host `[2001:db8::1]`. The download then goes through the proxy although the player excluded it. **Expected:** `excluded("[2001:db8::1]", "2001:db8::1")` is `true`. Actual: `false`. Bracketed entries with a port (`[2001:db8::1]:8080`) must keep working. **Reference:** curl/Go `NO_PROXY` handling treat an entry with more than one colon and no brackets as a bare IPv6 address, not `host:port`.
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6586037146 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, You hold 8 open issues: finish or /unclaim one first. (asked by @ClickingMaster)

<!-- gh-comment-id:6586041822 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, You hold 8 open issues: finish or `/unclaim` one first. (asked by @ClickingMaster)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3321
No description provided.