[PR #7656] port-pack net: a host name starting with 127. no longer skips the proxy #7744

Open
opened 2026-11-03 07:23:30 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7656
Author: @ClickingMaster
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/proxy-local-127-hostname


📝 Commits (1)

  • 15e302b port-pack net: only dotted 127.x.x.x addresses are local, not names starting with 127.

📊 Changes

1 file changed (+16 additions, -2 deletions)

View changed files

📝 crates/horizon-port-pack/src/net.rs (+16 -2)

📄 Description

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

Fixes #7629

Cause

net::local (crates/horizon-port-pack/src/net.rs) used host.starts_with("127."), so a DNS name such as 127.example.com counted as this computer and direct() skipped the configured proxy for it.

Fix

Only a dotted all-numeric 127.x.x.x address is loopback (is_loopback_v4); names that merely start with 127. go through the proxy.

Test

net::tests::this_computer_is_never_proxied now also checks 127.example.com and 127.0.0.1.example.com are not local. Before the fix: fails (127.example.com). After: passes; cargo test -p horizon-port-pack --lib 107 passed.

Self-check

  • cargo fmt --check, clippy -D warnings on horizon-port-pack: clean
  • port_ledger check: no ledger built on this machine
  • pr_ready.py not run: no ALSA headers

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7656 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/proxy-local-127-hostname` --- ### 📝 Commits (1) - [`15e302b`](https://github.com/horizon-rust/horizon/commit/15e302b7191f5ce67be68b2dd6710d2bdaa62c1b) port-pack net: only dotted 127.x.x.x addresses are local, not names starting with 127. ### 📊 Changes **1 file changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/net.rs` (+16 -2) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. Fixes #7629 ## Cause `net::local` (crates/horizon-port-pack/src/net.rs) used `host.starts_with("127.")`, so a DNS name such as `127.example.com` counted as this computer and `direct()` skipped the configured proxy for it. ## Fix Only a dotted all-numeric `127.x.x.x` address is loopback (`is_loopback_v4`); names that merely start with `127.` go through the proxy. ## Test `net::tests::this_computer_is_never_proxied` now also checks `127.example.com` and `127.0.0.1.example.com` are not local. Before the fix: fails (`127.example.com`). After: passes; `cargo test -p horizon-port-pack --lib` 107 passed. ## Self-check - cargo fmt --check, clippy -D warnings on horizon-port-pack: clean - port_ledger check: no ledger built on this machine - pr_ready.py not run: no ALSA headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7744
No description provided.