Skip to content

Add HAProxy PROXY Protocol Forwarding to Backend Servers #1504

Open
@oneHerobrine

Description

@oneHerobrine

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:

  1. Add a haproxy option to the forwarding-mode configuration.
  2. Allow Velocity to act as a PROXY Protocol sender (client role) when connecting to backend servers.
  3. 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:

  1. BungeeCord’s PROXY Protocol Support

    • Use BungeeCord instead of Velocity for PROXY forwarding.
    • Downsides: Lacks Velocity’s performance and modern features.
  2. Nginx Middleware

    • Deploy Nginx between Velocity and backend servers to add PROXY headers.
    • Downsides: Adds latency, complicates infrastructure, and duplicates Velocity’s role.
  3. Modify Backend Servers

    • Use plugins like TCPShield on Paper/Fabric to accept Velocity’s legacy mode.
    • Downsides: Introduces version dependency and breaks vanilla compatibility.

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions