[GH-ISSUE #4963] Velocity modern forwarding for horizon-server (dedicated server behind a proxy) #1499

Closed
opened 2026-11-02 15:47:26 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Detimes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4963

Originally assigned to: @Detimes on GitHub.

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

What is missing

A Horizon dedicated server cannot sit behind a Velocity proxy that does the Microsoft login. The roadmap covers the client side of proxy networks (cookies and transfers, #1650; the hostname, #4471; forced packs, #4464), but I found nothing on the server side. Behind a proxy the backend runs with online-mode=false, so without forwarding every player gets an offline UUID and name, no skin, and no real IP. Existing player data (keyed by UUID) would not match.

Proposal (Horizon-only, off by default)

Support Velocity's "modern" player information forwarding:

  • an option in server.toml (for example [server] velocity_secret; empty = off, as now);
  • when set, the login sends a login plugin request on velocity:player_info, checks the HMAC-SHA256 signature of the answer with the shared secret, and uses the forwarded profile (UUID, name, properties, address) instead of the offline one;
  • a login without a valid answer is refused with a clear message.

The format comes from Velocity's public documentation only (no source of Velocity, Paper or other projects is read, per CONTRIBUTING "Only original code").

Testing

Unit tests with hand-signed packets, plus a real Velocity proxy in offline mode in front of the server with horizon-bots as the client. online_mode stays as it is; the option is independent of it.

I'd like to take this: I'll /claim it and open a draft pull request early (kind extra).

Originally created by @Detimes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4963 Originally assigned to: @Detimes on GitHub. > 🤖 Filed by Detimes's AI agent (Claude Code, Claude Sonnet 5.5), not by Detimes personally. ### What is missing A Horizon dedicated server cannot sit behind a Velocity proxy that does the Microsoft login. The roadmap covers the client side of proxy networks (cookies and transfers, #1650; the hostname, #4471; forced packs, #4464), but I found nothing on the server side. Behind a proxy the backend runs with `online-mode=false`, so without forwarding every player gets an offline UUID and name, no skin, and no real IP. Existing player data (keyed by UUID) would not match. ### Proposal (Horizon-only, off by default) Support Velocity's "modern" player information forwarding: - an option in `server.toml` (for example `[server] velocity_secret`; empty = off, as now); - when set, the login sends a login plugin request on `velocity:player_info`, checks the HMAC-SHA256 signature of the answer with the shared secret, and uses the forwarded profile (UUID, name, properties, address) instead of the offline one; - a login without a valid answer is refused with a clear message. The format comes from Velocity's public documentation only (no source of Velocity, Paper or other projects is read, per CONTRIBUTING "Only original code"). ### Testing Unit tests with hand-signed packets, plus a real Velocity proxy in offline mode in front of the server with `horizon-bots` as the client. `online_mode` stays as it is; the option is independent of it. I'd like to take this: I'll `/claim` it and open a draft pull request early (kind `extra`).
Author
Owner

@Detimes commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6539355496 --> @Detimes commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Author
Owner

@Detimes commented on GitHub (Oct 31, 2026):

🤖 Agent: correction to the issue text. I wrote that the format comes from Velocity's public documentation only. That is not accurate: the official docs (docs.papermc.io/velocity/player-information-forwarding) only cover configuration, and the wire format is not documented there. A web search for it also returned pages of other projects' source code, and its summary told me roughly what the payload holds (a signature followed by version, address, UUID, name and properties). I did not open or read those pages.

To stay inside "Only original code", I plan to work out the exact format by observing a real Velocity proxy (a recording dummy backend behind it), write the format down myself from those captures, and implement only from that description. If you would rather I did not do this because of what I have seen, please say so and I will /unclaim.

<!-- gh-comment-id:6539397523 --> @Detimes commented on GitHub (Oct 31, 2026): 🤖 Agent: correction to the issue text. I wrote that the format comes from Velocity's public documentation only. That is not accurate: the official docs (docs.papermc.io/velocity/player-information-forwarding) only cover configuration, and the wire format is not documented there. A web search for it also returned pages of other projects' source code, and its summary told me roughly what the payload holds (a signature followed by version, address, UUID, name and properties). I did not open or read those pages. To stay inside "Only original code", I plan to work out the exact format by observing a real Velocity proxy (a recording dummy backend behind it), write the format down myself from those captures, and implement only from that description. If you would rather I did not do this because of what I have seen, please say so and I will `/unclaim`.
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#1499
No description provided.