Skip to content
Success

Changes

Summary

  1. Update IP forwarding to ignore FML and other null character delimited (commit: 4809f1f) (details)
  2. Add API for getting whether the user is a Forge user. (commit: 28496e0) (details)
Commit 4809f1f80ace9ae87b91453c8887c70f5e098bd0 by md_5
Update IP forwarding to ignore FML and other null character delimited tokens (for now)

For Forge 1.8, a new \0FML\0 token is included in the handshake packet host field. Whilst from a Forge <-> Bungee standpoint, this is good in the long run (we can detect Forge/FML clients right from the off, allowing us to expose a reliable API for detecting modded 1.8+ clients), it plays havoc with IP forwarding on Spigot servers, as they expect a very specific format.

Until we can look at improving this situation (probably by creating an updated IP forwarding protocol on the server side), this removes the FML marker from the handshake whenever IP forwarding is on. If you have a FML 1.8 network, IP forwarding MUST be off.

With thanks to @geNAZt for finding the issue.
(commit: 4809f1f)
The file was modifiedproxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java (diff)
The file was modifiedproxy/src/main/java/net/md_5/bungee/forge/ForgeConstants.java (diff)
The file was modifiedproxy/src/main/java/net/md_5/bungee/UserConnection.java (diff)
The file was modifiedproxy/src/main/java/net/md_5/bungee/forge/ForgeClientHandler.java (diff)
The file was modifiedproxy/src/main/java/net/md_5/bungee/ServerConnector.java (diff)
Commit 28496e0471237448db017115c769e684ecd76abc by md_5
Add API for getting whether the user is a Forge user.

For Minecraft+Forge 1.8 we can detect whether the user is a Forge user before we get the mod list, due to the changes to the initial (not FML|HS) handshake that are now made (which is for vanilla client support). Bungee can exploit this to detect FML clients from the off, but it still does not tell us what the mod list is. Thus, creating this API method for users who simply need to know whether the user is connected via FML is no longer a duplication of the getModList api method.
(commit: 28496e0)
The file was modifiedapi/src/main/java/net/md_5/bungee/api/connection/ProxiedPlayer.java (diff)
The file was modifiedproxy/src/main/java/net/md_5/bungee/UserConnection.java (diff)