Skip to content

Failed to connect with proxy protocol v2 with fatedier/frp #5714

@Daodanfd5

Description

@Daodanfd5

Describe the bug

geyser's proxy protocol support only get true endpoint but client could not connect to server.

To Reproduce

  1. Configure Geyser with bedrock.enable-proxy-protocol: true in config.yml.
  2. Set up frp reverse proxy with UDP forwarding and Proxy Protocol v2 enabled (transport.proxyProtocolVersion = "v2").
  3. Connect to Geyser via Minecraft Bedrock Edition client.(Windows 1.21.94, latest)
  4. Observe Geyser logs: Client IP is correctly resolved and displayed (e.g., /113.88.146.109:1567).
  5. Client connection fails despite correct IP parsing.It shows "113.88.146.109:1567 tried to connect" but unable to connect. in frp's log, it shows client send a lot of same packet tried to connect to server, but geyser did not return any packet.
  6. Configure Geyser with bedrock.enable-proxy-protocol: false in config.yml and disable Proxy Protocol v2 in frp.
  7. Connect to Geyser via Minecraft Bedrock Edition client.(Windows 1.21.94, latest)
  8. Console displays frpc's local ip(127.0.0.1) and port connecting to Geyser.
  9. Client can connect to server but unable to get real external IP:Port(e.g., /127.0.0.1:58606).

Expected behaviour

  1. Configure Geyser with bedrock.enable-proxy-protocol: true in config.yml and enable Proxy Protocol v2 in frp.
  2. Connect to Geyser via Minecraft Bedrock Edition client.(Windows 1.21.94, latest)
  3. Observe Geyser logs: Client IP is correctly resolved and displayed (e.g., /113.88.146.109:1567).
  4. Client can connect to server with log shows true external IP:Port (e.g., /113.88.146.109:1567).

Screenshots / Videos

No response

Server Version and Plugins

velocity plugins:
[11:00:24 INFO]: plugins: velocity, floodgate, geyser, haproxy-detector, minimotd-velocity, multilogin, viaversion, viabackwards

Geyser Dump

No response

Geyser Version

2.8.2-b887 (git-master-1f23d1d), Geyser Velocity

Minecraft: Bedrock Edition Device/Version

v1.21.94, Windows

Additional Context

Additional environment info:
Velocity version: 3.4.0-SNAPSHOT (git-e9940713-b522)
Platform: Windows 10 22H2, Java 21.0.7
frp (fatedier/frp) version: v0.63.0(latest)
tried enable and disable velocity's proxy protocol support and remove or add haproxy-detector, it doesn't works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Confirmed BugThe bug reported is confirmed and able to be replicated.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions