Repository navigation
Add Minecraft 26.3 support - #2
jschenke488 wants to merge 10 commits into
Conversation
Server-side NeoForge mod that reads HAProxy PROXY protocol headers (v1/v2) from incoming connections and applies the real client IP to the Minecraft connection, replacing the proxy address seen behind FRP, nginx, HAProxy, or Traefik. One universal jar covers NeoForge 1.21 through 1.21.11. Features a trusted-proxy allowlist, required/optional modes, live-reloading config, v1/v2 detection, and LOCAL/health-check handling.
Splits src/main into common/neoforge/fabric. Extracts HAProxyCompatConfig with a loader-agnostic Value<T> interface; each loader calls init() at startup. Adds FabricConfig (JSON via Gson) and a Fabric DedicatedServerModInitializer. Upgrades Gradle wrapper to 9.5.0 and both Fabric subprojects to Loom 1.17.1 (Gradle 9.5.0 promotes the highest plugin version across the build, so both must match). MC 26.1.x ships without mappings; noIntermediateMappings() plus a generated identity Tiny v2 jar work around the missing Intermediary/Yarn. Adds fabric-1.21 and fabric-26.1 CI matrix entries and release workflows.
…ist (1.0.1) When require_proxy_protocol is true, clients connecting without a PROXY header now receive a LoginDisconnect with the configured kick_message instead of hanging until timeout. The server list shows a red X with the kick_message as the MOTD. Uses mixins on ServerLoginPacketListenerImpl and ServerStatusPacketListenerImpl.
|
Tested and confirmed working. Fabric works with no errors. NeoForge works, but the server console shows an exception on startup related to Log4j. Connections still work as expected on both Fabric and NeoForge, and the IP is correctly reported with connection logging enabled. Not sure how to fix the exception on NeoForge, but it doesn't seem to affect functionality. |
|
Thanks a lot for putting this together, and for testing it on both loaders. This got closed when I pushed a restructured build, which replaces this approach. From 1.1.0 there are no more per-version subprojects ( About the Log4j exception: that's harmless and not caused by the mod. Netty checks for the macOS-only kqueue transport, fails on Linux/Windows, and NeoForge's debug log appender trips over that failure. It shows up with or without HAProxyCompat. If you'd like to help with a future version, a PR that bumps the ranges in |
I built it successfully, but I haven't had a chance to test it yet. I'll mark the PR as ready as soon as I can test the functionality.