Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7031

Bungee IP forwarding with a port results in a "<unresolved>" IP


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Spigot server with a self-written development proxy which uses bungee forwarding

    • 3496-Spigot-b081915-a59dc59 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
    • Yes

      Bungee IP forwarding does not work like expected when sending a IP:PORT string. Spigot cannot resolve the IP and it stays unresolved, but continues to allow the client to join.


      The console output looks like this:

      [Server thread/INFO]: mammut53[<unresolved>:49657] logged in with entity id 147 at ([world]24.5, 74.0, -38.5) 

      This is clearly not intended behaviour. Having a quick looking into the Spigot patches, I noticed that there is a regex which allows a ":" in the IP part of the forwarded information, but this part gets matched and directly feed into java.net.InetSocketAddress here. Another strangeness here is also the port that gets feed into java.net.InetSocketAddress. This is the proxy's port to the server and not the port of the client to the proxy.


      Quick note:

      Sending no IP (this means nothing between the null characters) also allows the client to join:

      [Server thread/INFO]: mammut53[localhost/] logged in with entity id 583 at ([world]-36.33158959627857, 78.0, -182.12459419585574)


      Maybe I'm missing something and this is necessary?


      I would hope that this gets changed so that I can also forward the client's port. In my opinion, it looks like that this was initially an intended "feature" and someone just forgot to handle this case and everyone else just ended up only sending the IP without the port for this reason.



      Fun fact: With a player based IP-ban, you can actually ban the "<unresolved>" IP

            Unassigned Unassigned
            mammut53 mammut53
            0 Vote for this issue
            2 Start watching this issue