Merge Bungeecord#e93323d

This commit is contained in:
Jamie Mansfield 2018-05-28 21:53:01 +01:00
parent 7385da83cf
commit aab96dc7e8
12 changed files with 85 additions and 50 deletions

@ -1 +1 @@
Subproject commit fde2c3fadfc00474e6ab54870d6f18b6e70feb81
Subproject commit 2c84083153ed1845e432b350517c09fdd85939af

View File

@ -1,4 +1,4 @@
From 207551ef6b7e99e5f4844b9e7fb8c693b925d85c Mon Sep 17 00:00:00 2001
From e479146e89c47110e3a7d39ecbf02bbea4f56fad Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 11:28:45 -0700
Subject: [PATCH] Rename references from BungeeCord to Waterfall
@ -53,7 +53,7 @@ index 9d51608d..446dfe2f 100644
while ( bungee.isRunning )
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index 5405a537..0d41645b 100644
index 77873239..5569951d 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -188,7 +188,7 @@ public class BungeeCord extends ProxyServer
@ -65,7 +65,7 @@ index 5405a537..0d41645b 100644
System.setSecurityManager( new BungeeSecurityManager() );
@@ -479,7 +479,7 @@ public class BungeeCord extends ProxyServer
@@ -484,7 +484,7 @@ public class BungeeCord extends ProxyServer
@Override
public String getName()
{
@ -114,5 +114,5 @@ index 408312fd..95590b6d 100644
InetSocketAddress address = Util.getAddr( addr );
ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted );
--
2.16.1
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From deab52d855171f7f411835d801e6edc3ef5f343a Mon Sep 17 00:00:00 2001
From 41bf96f33293ee1703053874c7b3adba3100258c Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Thu, 19 May 2016 10:55:20 -0700
Subject: [PATCH] Configurable Waterfall Metrics
@ -46,10 +46,10 @@ index f9e277dc..056b8040 100644
}
}
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index 1144ec73..179e3a3a 100644
index 30613a06..56bbd3c4 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -294,7 +294,9 @@ public class BungeeCord extends ProxyServer
@@ -299,7 +299,9 @@ public class BungeeCord extends ProxyServer
}
}
}, 0, TimeUnit.MINUTES.toMillis( 5 ) );
@ -82,5 +82,5 @@ index 95239878..e482e98c 100644
// Connect to the website
URLConnection connection;
--
2.16.1
2.17.0.windows.1

View File

@ -1,14 +1,14 @@
From 42cac75a8cf299e9afb7b8eed942b9a69e1c01fa Mon Sep 17 00:00:00 2001
From db66e7b6fb17dd035a59211fbba9c1850ed0c32c Mon Sep 17 00:00:00 2001
From: Iceee <andrew@optic.tv>
Date: Mon, 6 Jul 2015 18:59:29 -0500
Subject: [PATCH] Don't allow channel buffers to grow beyond a reasonable limit
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index c93607fd..507db01f 100644
index 8458be34..fb751232 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -324,6 +324,8 @@ public class BungeeCord extends ProxyServer
@@ -329,6 +329,8 @@ public class BungeeCord extends ProxyServer
new ServerBootstrap()
.channel( PipelineUtils.getServerChannel() )
.option( ChannelOption.SO_REUSEADDR, true ) // TODO: Move this elsewhere!
@ -18,5 +18,5 @@ index c93607fd..507db01f 100644
.childHandler( PipelineUtils.SERVER_CHILD )
.group( eventLoops )
--
2.16.1
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From 8ff1ce2f0f3ee89d143142058ab1019b4a3ddcd4 Mon Sep 17 00:00:00 2001
From 9366d5ee793cf91365eeb4dbf38c6e8be6b6c3ac Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 28 Jan 2016 15:13:29 -0700
Subject: [PATCH] Allow removing servers or changing addresses on reload
@ -10,7 +10,7 @@ Kicks players on failure to move.
Original Issue: https://github.com/WaterfallMC/Waterfall-Old/issues/17
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
index 4a55c0e2..d131c02c 100644
index 6c722e8b..3a73a870 100644
--- a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
+++ b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
@@ -11,12 +11,15 @@ import java.util.UUID;
@ -29,7 +29,7 @@ index 4a55c0e2..d131c02c 100644
import net.md_5.bungee.util.CaseInsensitiveMap;
import net.md_5.bungee.util.CaseInsensitiveSet;
@@ -99,18 +102,31 @@ public abstract class Configuration implements ProxyConfig
@@ -101,18 +104,31 @@ public abstract class Configuration implements ProxyConfig
servers = new CaseInsensitiveMap<>( newServers );
} else
{
@ -72,5 +72,5 @@ index 4a55c0e2..d131c02c 100644
}
}
--
2.16.1
2.17.0.windows.1

View File

@ -1,6 +1,6 @@
From b894a7436429ca4e1bdcc5d39c0d34bf16b82383 Mon Sep 17 00:00:00 2001
From 974ef96fabc5835a6385b76a76a8cdf8891b81a2 Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Wed, 24 Feb 2016 17:16:23 +0000
Date: Sun, 24 Jan 2016 15:13:29 -0700
Subject: [PATCH] Enable TCP_NODELAY.
This is enabled by default on CraftBukkit/Spigot >= 1.8 and may help with network performance.
@ -18,5 +18,5 @@ index be9685b9..b0bbc1d7 100644
ch.config().setWriteBufferWaterMark( MARK );
--
2.16.1
2.17.0.windows.1

View File

@ -1,6 +1,6 @@
From 3a4e54f376d30d7f9cd187e5da62ee80d9dfb5dc Mon Sep 17 00:00:00 2001
From 24dd867b9a796cd9fe22f66fdf2ae6215727ab66 Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Thu, 19 May 2016 18:05:33 -0600
Date: Tue, 19 Jan 2016 15:13:29 -0700
Subject: [PATCH] Micro-optimizations
- PluginManager.dispatchCommand() avoids regex while splitting commands. Java 7 introduced an optimized String.split() that should be used instead (affects command dispatch).
@ -31,10 +31,10 @@ index 71a5a158..520ee315 100644
if ( split.length == 0 )
{
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index 507db01f..fde98e27 100644
index fb751232..eff7a89c 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -512,7 +512,9 @@ public class BungeeCord extends ProxyServer
@@ -517,7 +517,9 @@ public class BungeeCord extends ProxyServer
String translation = "<translation '" + name + "' missing>";
try
{
@ -79,5 +79,5 @@ index 9ea61319..565e6b0e 100644
String subChannel = in.readUTF();
--
2.16.1
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From 1a25d40377f6737665656f8327b5e2571b5a7f3f Mon Sep 17 00:00:00 2001
From 39ee1270efb5adc9ff6e38b7e50824b5cda6d97d Mon Sep 17 00:00:00 2001
From: Janmm14 <computerjanimaus@yahoo.de>
Date: Sat, 12 Dec 2015 23:43:30 +0100
Subject: [PATCH] Optional server list ping logging.
@ -61,10 +61,10 @@ index e56d3591..68f25460 100644
+ }
}
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
index 6df62b22..972c70ec 100644
index 68fef8a4..817ec3e1 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -390,6 +390,6 @@ public class ServerConnector extends PacketHandler
@@ -392,6 +392,6 @@ public class ServerConnector extends PacketHandler
@Override
public String toString()
{
@ -122,10 +122,10 @@ index 59216860..1c764f52 100644
@Override
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
index ccdeaed1..742ff503 100644
index 6d0eb7e9..9fb20de1 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
@@ -237,6 +237,6 @@ public class UpstreamBridge extends PacketHandler
@@ -241,6 +241,6 @@ public class UpstreamBridge extends PacketHandler
@Override
public String toString()
{
@ -134,5 +134,5 @@ index ccdeaed1..742ff503 100644
}
}
--
2.16.3
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From 54a03d0d14c69cdc40bbf9e07a75643f0725864a Mon Sep 17 00:00:00 2001
From 3afd7ec28bfd625e5aaf366bbc2d52ae088a1eae Mon Sep 17 00:00:00 2001
From: kamcio96 <k.nadworski@icloud.com>
Date: Mon, 14 Mar 2016 16:07:20 -0700
Subject: [PATCH] Use a worker and a boss event loop group.
@ -8,7 +8,7 @@ Merges the rest of https://github.com/SpigotMC/BungeeCord/pull/1706 by @kamcio96
This is proper practice for netty.
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index fde98e27..40f28a12 100644
index eff7a89c..adb15d5b 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -117,7 +117,7 @@ public class BungeeCord extends ProxyServer
@ -30,7 +30,7 @@ index fde98e27..40f28a12 100644
File moduleDirectory = new File( "modules" );
moduleManager.load( this, moduleDirectory );
@@ -328,7 +329,7 @@ public class BungeeCord extends ProxyServer
@@ -333,7 +334,7 @@ public class BungeeCord extends ProxyServer
.childOption( ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, 1024 * 1024 * 1 )
.childAttr( PipelineUtils.LISTENER, info )
.childHandler( PipelineUtils.SERVER_CHILD )
@ -39,7 +39,7 @@ index fde98e27..40f28a12 100644
.localAddress( info.getHost() )
.bind().addListener( listener );
@@ -349,7 +350,7 @@ public class BungeeCord extends ProxyServer
@@ -354,7 +355,7 @@ public class BungeeCord extends ProxyServer
}
}
};
@ -48,7 +48,7 @@ index fde98e27..40f28a12 100644
}
}
}
@@ -440,12 +441,14 @@ public class BungeeCord extends ProxyServer
@@ -445,12 +446,14 @@ public class BungeeCord extends ProxyServer
}
getLogger().info( "Closing IO threads" );
@ -83,5 +83,5 @@ index 9756c09c..648cd273 100644
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 ) // TODO: Configurable
.remoteAddress( getAddress() )
--
2.16.1
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From a575b61861d16924305e4f832be476a936f0c186 Mon Sep 17 00:00:00 2001
From 985a9137271f3307588d1272278749fca0494e50 Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Wed, 29 Jun 2016 04:29:25 +0200
Subject: [PATCH] Add dynamic server addition/removal api.
@ -157,10 +157,10 @@ index 416c54e3..920b9b36 100644
private final String lower = ( args.length == 0 ) ? "" : args[0].toLowerCase();
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index 40f28a12..f14821b4 100644
index adb15d5b..dc652415 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -588,10 +588,18 @@ public class BungeeCord extends ProxyServer
@@ -593,10 +593,18 @@ public class BungeeCord extends ProxyServer
return config.getServers();
}
@ -181,7 +181,7 @@ index 40f28a12..f14821b4 100644
@Override
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
index d131c02c..a755121a 100644
index 3a73a870..d3f0b2d8 100644
--- a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
+++ b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
@@ -1,6 +1,7 @@
@ -208,15 +208,15 @@ index d131c02c..a755121a 100644
/**
* Set of all servers.
*/
@@ -62,6 +65,7 @@ public abstract class Configuration implements ProxyConfig
private int compressionThreshold = 256;
@@ -63,6 +66,7 @@ public abstract class Configuration implements ProxyConfig
private boolean preventProxyConnections;
private boolean forgeSupport;
+ @Synchronized("serversLock") // Waterfall
public void load()
{
ConfigurationAdapter adapter = ProxyServer.getInstance().getConfigurationAdapter();
@@ -102,7 +106,7 @@ public abstract class Configuration implements ProxyConfig
@@ -104,7 +108,7 @@ public abstract class Configuration implements ProxyConfig
servers = new CaseInsensitiveMap<>( newServers );
} else
{
@ -225,7 +225,7 @@ index d131c02c..a755121a 100644
this.servers = new CaseInsensitiveMap<>(newServers);
for ( ServerInfo oldServer : oldServers.values() )
@@ -160,4 +164,71 @@ public abstract class Configuration implements ProxyConfig
@@ -162,4 +166,71 @@ public abstract class Configuration implements ProxyConfig
{
return favicon;
}
@ -298,5 +298,5 @@ index d131c02c..a755121a 100644
+ // Waterfall end
}
--
2.16.3
2.17.0.windows.1

View File

@ -1,4 +1,4 @@
From ff7fc3cfd40c91a22308b2852a9b41b2cf2c1ff3 Mon Sep 17 00:00:00 2001
From 656e72bfea6ec93572fedf068571dd385d9e555e Mon Sep 17 00:00:00 2001
From: Troy Frew <fuzzy_bot@arenaga.me>
Date: Wed, 29 Jun 2016 13:56:57 -0500
Subject: [PATCH] Configurable server version in ping response
@ -59,10 +59,10 @@ index 68f25460..59835815 100644
@Override
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index f14821b4..064a7672 100644
index dc652415..f140f026 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -637,7 +637,7 @@ public class BungeeCord extends ProxyServer
@@ -642,7 +642,7 @@ public class BungeeCord extends ProxyServer
@Override
public String getGameVersion()
{
@ -72,5 +72,5 @@ index f14821b4..064a7672 100644
@Override
--
2.16.1
2.17.0.windows.1

View File

@ -0,0 +1,35 @@
From a5fba8faeafb66c208822e5929c87a9601f5c7a7 Mon Sep 17 00:00:00 2001
From: Jamie Mansfield <dev@jamierocks.uk>
Date: Mon, 28 May 2018 21:43:55 +0100
Subject: [PATCH] Forge is a first class citizen
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index bdb05826..07e46026 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -277,8 +277,6 @@ public class BungeeCord extends ProxyServer
registerChannel( ForgeConstants.FML_TAG );
registerChannel( ForgeConstants.FML_HANDSHAKE_TAG );
registerChannel( ForgeConstants.FORGE_REGISTER );
-
- getLogger().warning( "MinecraftForge support is currently unmaintained and may have unresolved issues. Please use at your own risk." );
}
isRunning = true;
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
index d3f0b2d8..242535d0 100644
--- a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
+++ b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java
@@ -64,7 +64,7 @@ public abstract class Configuration implements ProxyConfig
private Favicon favicon;
private int compressionThreshold = 256;
private boolean preventProxyConnections;
- private boolean forgeSupport;
+ private boolean forgeSupport = true; // Waterfall: default to enabled
@Synchronized("serversLock") // Waterfall
public void load()
--
2.17.0.windows.1