Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 08:10:11 +01:00
Fix/proxy protocol missing message (#3898)
* Show proxy protocol ip for debug message * Make sure that first message that contains proxy protocol also gets sent. This caused issues with serverlists and console players
Dieser Commit ist enthalten in:
Ursprung
811aba3339
Commit
50d3945477
@ -187,7 +187,16 @@ public final class GeyserServer {
|
||||
|
||||
public BedrockPong onQuery(InetSocketAddress inetSocketAddress) {
|
||||
if (geyser.getConfig().isDebugMode() && PRINT_DEBUG_PINGS) {
|
||||
String ip = geyser.getConfig().isLogPlayerIpAddresses() ? inetSocketAddress.toString() : "<IP address withheld>";
|
||||
String ip;
|
||||
if (geyser.getConfig().isLogPlayerIpAddresses()) {
|
||||
if (geyser.getConfig().getBedrock().isEnableProxyProtocol()) {
|
||||
ip = this.proxiedAddresses.getOrDefault(inetSocketAddress, inetSocketAddress).toString();
|
||||
} else {
|
||||
ip = inetSocketAddress.toString();
|
||||
}
|
||||
} else {
|
||||
ip = "<IP address withheld>";
|
||||
}
|
||||
geyser.getLogger().debug(GeyserLocale.getLocaleStringLog("geyser.network.pinged", ip));
|
||||
}
|
||||
|
||||
|
@ -73,10 +73,10 @@ public class ProxyServerHandler extends SimpleChannelInboundHandler<DatagramPack
|
||||
presentAddress = new InetSocketAddress(decoded.sourceAddress(), decoded.sourcePort());
|
||||
log.debug("Got PROXY header: (from {}) {}", packet.sender(), presentAddress);
|
||||
GeyserImpl.getInstance().getGeyserServer().getProxiedAddresses().put(packet.sender(), presentAddress);
|
||||
return;
|
||||
} else {
|
||||
log.trace("Reusing PROXY header: (from {}) {}", packet.sender(), presentAddress);
|
||||
}
|
||||
|
||||
log.trace("Reusing PROXY header: (from {}) {}", packet.sender(), presentAddress);
|
||||
ctx.fireChannelRead(packet.retain());
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren