Add HAProxy PROXY Protocol Forwarding to Backend Servers
Requested Feature
Introduce HAProxy PROXY Protocol forwarding as a new IP forwarding mode in Velocity, enabling it to send PROXY Protocol headers to backend servers (e.g., Paper, Fabric, Forge). This would:
- Add a
haproxyoption to theforwarding-modeconfiguration. - Allow Velocity to act as a PROXY Protocol sender (client role) when connecting to backend servers.
- Ensure backend servers receive standardized client metadata (IP, port) via PROXY headers.
Why is this needed?
Clarification:
Velocity already supports receiving PROXY Protocol from upstream proxies (e.g., HAProxy, Cloudflare), but lacks the ability to forward this metadata to downstream backend servers. This gap causes issues in multi-layer proxy setups.
Alternative Solutions
Attempted Workarounds:
-
BungeeCord’s PROXY Protocol Support
- Use BungeeCord instead of Velocity for PROXY forwarding.
- Downsides: Lacks Velocity’s performance and modern features.
-
Nginx Middleware
- Deploy Nginx between Velocity and backend servers to add PROXY headers.
- Downsides: Adds latency, complicates infrastructure, and duplicates Velocity’s role.
-
Modify Backend Servers
- Use plugins like TCPShield on Paper/Fabric to accept Velocity’s
legacymode. - Downsides: Introduces version dependency and breaks vanilla compatibility.
- Use plugins like TCPShield on Paper/Fabric to accept Velocity’s
Additional Information
No response
haproxy could never be an alternative to any of the existing player info forwarding options because it doesn't support sending the information required of that mechanism for supported setups, and thus, would not be worth the effort.
I'm also generally not sure what this would actually solve
I'm migrating to Velocity and encountered the same issue.