[PR #5474] [MERGED] horizon-server: the management protocol changes the IP bans and the operators #6310

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

📋 Pull Request Information

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

Base: main ← Head: server-admin/management-ops-ipbans


📝 Commits (1)

  • 5cc9677 horizon-server: the management protocol changes the IP bans and the operators

📊 Changes

5 files changed (+347 additions, -24 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated/management.rs (+188 -2)
📝 crates/horizon-server/src/management_methods.rs (+139 -14)
📝 docs/api/server.md (+3 -3)
📝 docs/server.md (+3 -4)
📝 tools/test_management_protocol_parity.py (+14 -1)

📄 Description

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

Roadmap server-admin, part 6e: vanilla's management protocol changes the IP bans and the operators: ip_bans/{add,remove,set,clear} and operators/{add,remove,set,clear}. They work as vanilla 26.3's IpBanlistService and OperatorService, through the game's management request that #5463 added for the allowlist and the bans. All four lists can now be read and changed.

IP bans

  • add takes an address. When the address isn't valid, it takes an online player's address, found by id first, then by name.
  • Whoever is online from a banned address is disconnected with multiplayer.disconnect.ip_banned.
  • set ignores entries whose address isn't valid. Two bans are equal when address, reason, source and end match.
  • The source is "Management server" unless one is given.

Operators

  • The level asked for (0 to 4), else op-permission-level.
  • The bypass asked for, else the one the player already had.
  • set compares Op records as vanilla does: an entry without a level or bypass never equals a stored operator, so that operator is removed and then added again with the defaults.
  • What online players may run follows each change (sync_ops).

Supervisor. It checks the DTOs: IncomingIpBanDto, IpBanDto (ip required), OperatorDto (level 0–4, boolean bypass). A unit test covers them.

Parity harness. tools/test_management_protocol_parity.py now also changes the IP bans and the operators. Its cases: an invalid address, an offline player named, IPv6, an operator by an id the cache doesn't know, and a set that leaves an equal operator alone. It compares every answer (50 exchanges over TLS) and passed against vanilla 26.3 on the Mac mini.

This PR: 5 files, +347 −24.

Checks (ludovics-mac-mini, at 5cc967780 on origin/main 46e6854e4). These are the same steps as pr_ready for these crates; #5463's full pr_ready covered the rest, and its lan_bot failures come from main.

Check Result
Public tree ✅
rustfmt ✅
clippy (-p horizon-client -p horizon-server --all-targets -D warnings) ✅
tests: horizon-server, horizon-server-files ✅ 88 + 13 passed
Parity ✅ test_management_protocol_parity.py: 50 exchanges over TLS against vanilla 26.3

🤖 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/5474 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `server-admin/management-ops-ipbans` --- ### 📝 Commits (1) - [`5cc9677`](https://github.com/horizon-rust/horizon/commit/5cc967780fa5be84f78125cb148e3c04d85bd49b) horizon-server: the management protocol changes the IP bans and the operators ### 📊 Changes **5 files changed** (+347 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated/management.rs` (+188 -2) 📝 `crates/horizon-server/src/management_methods.rs` (+139 -14) 📝 `docs/api/server.md` (+3 -3) 📝 `docs/server.md` (+3 -4) 📝 `tools/test_management_protocol_parity.py` (+14 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Roadmap `server-admin`, part 6e: vanilla's management protocol changes the IP bans and the operators: `ip_bans/{add,remove,set,clear}` and `operators/{add,remove,set,clear}`. They work as vanilla 26.3's `IpBanlistService` and `OperatorService`, through the game's `management` request that #5463 added for the allowlist and the bans. All four lists can now be read and changed. **IP bans** - `add` takes an address. When the address isn't valid, it takes an online player's address, found by id first, then by name. - Whoever is online from a banned address is disconnected with `multiplayer.disconnect.ip_banned`. - `set` ignores entries whose address isn't valid. Two bans are equal when address, reason, source and end match. - The source is "Management server" unless one is given. **Operators** - The level asked for (0 to 4), else `op-permission-level`. - The bypass asked for, else the one the player already had. - `set` compares `Op` records as vanilla does: an entry without a level or bypass never equals a stored operator, so that operator is removed and then added again with the defaults. - What online players may run follows each change (`sync_ops`). **Supervisor.** It checks the DTOs: `IncomingIpBanDto`, `IpBanDto` (`ip` required), `OperatorDto` (level 0–4, boolean bypass). A unit test covers them. **Parity harness.** `tools/test_management_protocol_parity.py` now also changes the IP bans and the operators. Its cases: an invalid address, an offline player named, IPv6, an operator by an id the cache doesn't know, and a `set` that leaves an equal operator alone. It compares every answer (50 exchanges over TLS) and passed against vanilla 26.3 on the Mac mini. This PR: 5 files, +347 −24. **Checks** (ludovics-mac-mini, at 5cc967780 on origin/main 46e6854e4). These are the same steps as pr_ready for these crates; #5463's full pr_ready covered the rest, and its lan_bot failures come from main. | Check | Result | | --- | --- | | Public tree | ✅ | | rustfmt | ✅ | | clippy (`-p horizon-client -p horizon-server --all-targets -D warnings`) | ✅ | | tests: horizon-server, horizon-server-files | ✅ 88 + 13 passed | | Parity | ✅ `test_management_protocol_parity.py`: 50 exchanges over TLS against vanilla 26.3 | 🤖 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 06:18:04 +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#6310
No description provided.