From 4ffc9d9c0ce6559bab36fcffcbea8e8bc4c42bf2 Mon Sep 17 00:00:00 2001 From: Stefano Date: Fri, 27 Sep 2024 18:19:29 +0200 Subject: [PATCH] Adjust HAProxy's existance to log for console masters (#11433) --- patches/server/Add-support-for-Proxy-Protocol.patch | 13 +++++++++++++ ...se-Velocity-compression-and-cipher-natives.patch | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/patches/server/Add-support-for-Proxy-Protocol.patch b/patches/server/Add-support-for-Proxy-Protocol.patch index 4597796a7e..5c56d42c70 100644 --- a/patches/server/Add-support-for-Proxy-Protocol.patch +++ b/patches/server/Add-support-for-Proxy-Protocol.patch @@ -20,6 +20,19 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +@@ -0,0 +0,0 @@ public class ServerConnectionListener { + ServerConnectionListener.LOGGER.info("Using default channel type"); + } + ++ // Paper start - Warn people with console access that HAProxy is in use. ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.proxyProtocol) { ++ ServerConnectionListener.LOGGER.warn("Using HAProxy, please ensure the server port is adequately firewalled."); ++ } ++ // Paper end - Warn people with console access that HAProxy is in use. ++ + this.channels.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer() { + protected void initChannel(Channel channel) { + try { @@ -0,0 +0,0 @@ public class ServerConnectionListener { Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error diff --git a/patches/server/Use-Velocity-compression-and-cipher-natives.patch b/patches/server/Use-Velocity-compression-and-cipher-natives.patch index bb7f6a58ed..e49b6d2bfa 100644 --- a/patches/server/Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/Use-Velocity-compression-and-cipher-natives.patch @@ -340,8 +340,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java @@ -0,0 +0,0 @@ public class ServerConnectionListener { - ServerConnectionListener.LOGGER.info("Using default channel type"); } + // Paper end - Warn people with console access that HAProxy is in use. + // Paper start - Use Velocity cipher + ServerConnectionListener.LOGGER.info("Paper: Using " + com.velocitypowered.natives.util.Natives.compress.getLoadedVariant() + " compression from Velocity.");