[PR #2281] [MERGED] Launcher proxy: keep credentials out of messages, and build again #4171

Closed
opened 2026-11-03 04:15:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2281
Author: @ludovic111
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/launcher-proxy-redact


📝 Commits (1)

  • 600b2a1 Launcher proxy: keep a proxy's credentials out of messages; build again

📊 Changes

3 files changed (+55 additions, -7 deletions)

View changed files

📝 crates/horizon-port-pack/src/net.rs (+40 -3)
📝 launcher/src/browser/horizon.rs (+1 -1)
📝 launcher/src/proxy.rs (+14 -3)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What and why

Two follow-ups to #2059 (thanks @zhykowo for the proxy support).

  1. Credentials stay out of messages. When the launcher can't use a proxy address, it says so. horizon-port-pack prints the address to stderr ("The proxy address … can't be used", "… is a SOCKS proxy"), and the launcher shows it under the Settings field and in the settings set proxy error. An address like http://user:pass@host:3128 was printed with its password. The new horizon_port_pack::net::redacted replaces everything before the last @ with ***, which also covers a password with an unescaped / or @. All four messages now use it.
  2. The launcher builds again. #2059 changed download::agent() to take the address it reaches. The registry's star ratings (3dd17ad7d) landed beside it and still called download::agent(), so launcher/ on main doesn't compile (E0061 in browser/horizon.rs). CI verify doesn't build the launcher workspace, so nothing caught it.

Testing

  • net::tests::credentials_are_not_shown: plain addresses are unchanged; user:pass@, a SOCKS address with credentials, an address without a scheme, a password with / and @, and a host-less http://user:pass@ are all redacted.
  • proxy::tests::a_refused_address_keeps_its_credentials_to_itself: the refusal reasons shown by the launcher no longer contain the password.
  • cargo test --lib in launcher/: 137 passed (it didn't compile before this change).

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 1851dc87a, 32 s)

Check Result
Scope ⚠️ 3 files, +55 −7; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅
rustfmt ✅ (12 s)
clippy ✅
tests: horizon-port-pack ✅ 68 passed (9 s)
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 s)
launcher tests ✅ 137 passed (3 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration

🤖 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/2281 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-proxy-redact` --- ### 📝 Commits (1) - [`600b2a1`](https://github.com/horizon-rust/horizon/commit/600b2a1dda2a94c065e2e68e9e8bffd3189c4b99) Launcher proxy: keep a proxy's credentials out of messages; build again ### 📊 Changes **3 files changed** (+55 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/net.rs` (+40 -3) 📝 `launcher/src/browser/horizon.rs` (+1 -1) 📝 `launcher/src/proxy.rs` (+14 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why Two follow-ups to #2059 (thanks @zhykowo for the proxy support). 1. **Credentials stay out of messages.** When the launcher can't use a proxy address, it says so. `horizon-port-pack` prints the address to stderr ("The proxy address … can't be used", "… is a SOCKS proxy"), and the launcher shows it under the Settings field and in the `settings set proxy` error. An address like `http://user:pass@host:3128` was printed with its password. The new `horizon_port_pack::net::redacted` replaces everything before the last `@` with `***`, which also covers a password with an unescaped `/` or `@`. All four messages now use it. 2. **The launcher builds again.** #2059 changed `download::agent()` to take the address it reaches. The registry's star ratings (3dd17ad7d) landed beside it and still called `download::agent()`, so `launcher/` on main doesn't compile (E0061 in `browser/horizon.rs`). CI verify doesn't build the launcher workspace, so nothing caught it. ## Testing - `net::tests::credentials_are_not_shown`: plain addresses are unchanged; `user:pass@`, a SOCKS address with credentials, an address without a scheme, a password with `/` and `@`, and a host-less `http://user:pass@` are all redacted. - `proxy::tests::a_refused_address_keeps_its_credentials_to_itself`: the refusal reasons shown by the launcher no longer contain the password. - `cargo test --lib` in `launcher/`: 137 passed (it didn't compile before this change). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 1851dc87a, 32 s) | Check | Result | | --- | --- | | Scope | ⚠️ 3 files, +55 −7; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | rustfmt | ✅ (12 s) | | clippy | ✅ | | tests: horizon-port-pack | ✅ 68 passed (9 s) | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 s) | | launcher tests | ✅ 137 passed (3 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | 🤖 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>
bsakaguchi 2026-11-03 04:15:12 +07:00
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#4171
No description provided.