timvisee / lazymc

💤 Put your Minecraft server to rest when idle.
GNU General Public License v3.0
573 stars 15 forks source link

Add option to pass HAProxy v2 header to server #10

Closed timvisee closed 2 years ago

timvisee commented 2 years ago

Add a configuration option to send a HAProxy v2 header with proxied connections. This allows communicating the real client IP to the Minecraft server when a companion plugin is installed.

This fixes the Minecraft server seeing all clients connecting from the same IP, namely the proxy, breaking IP-banning features.

Spigot plugins to handle this header on the Minecraft server side:

Fixes https://github.com/timvisee/lazymc/issues/9

This was suggested by @sgdc3 .

timvisee commented 2 years ago

This has been implemented on the feature-proxy-header branch. I have not been able to properly test this though.

timvisee commented 2 years ago

This is released as part of v0.2.3.

Please see: https://github.com/timvisee/lazymc/blob/master/docs/proxy-ip.md