Adjust HAProxy's existance to log for console masters (#11433)
This commit is contained in:
parent
20ec62255d
commit
627cc64eea
4 changed files with 22 additions and 9 deletions
|
@ -17,10 +17,23 @@ index 688e901b75e95941e0101cc7d0c4effa7993cf3f..9de7a09c5f1b23754a2823978fa3ff21
|
|||
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index c63c194c44646e6bc1a59426552787011fc2ced5..96355e1da8feb6687ea0069dda4a82fcd7e25e8a 100644
|
||||
index c63c194c44646e6bc1a59426552787011fc2ced5..c62df32af11636ad408b584fcc590590ce4fb0d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -123,6 +123,29 @@ public class ServerConnectionListener {
|
||||
@@ -104,6 +104,12 @@ 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<Channel>() {
|
||||
protected void initChannel(Channel channel) {
|
||||
try {
|
||||
@@ -123,6 +129,29 @@ public class ServerConnectionListener {
|
||||
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
|
||||
|
||||
//ServerConnectionListener.this.connections.add(object); // Paper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue