3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Correctly forward the player's virtual host to the remote server.

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-02-01 16:17:02 -05:00
Ursprung 4f80d2b261
Commit b88c573eb1

Datei anzeigen

@ -101,7 +101,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
// separated by \0 (the null byte). In order, you send the original host, the player's IP, their // separated by \0 (the null byte). In order, you send the original host, the player's IP, their
// UUID (undashed), and if you are in online-mode, their login properties (from Mojang). // UUID (undashed), and if you are in online-mode, their login properties (from Mojang).
StringBuilder data = new StringBuilder() StringBuilder data = new StringBuilder()
.append(registeredServer.getServerInfo().getAddress().getHostString()) .append(proxyPlayer.getVirtualHost()
.orElseGet(() -> registeredServer.getServerInfo().getAddress())
.getHostString())
.append('\0') .append('\0')
.append(proxyPlayer.getRemoteAddress().getHostString()) .append(proxyPlayer.getRemoteAddress().getHostString())
.append('\0') .append('\0')