mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-29 19:11:47 +01:00
Merge upstream
This commit is contained in:
parent
228318425b
commit
7e1c6381ee
@ -1 +1 @@
|
||||
Subproject commit 6104354fa1a87a8a09d852ef8ec388611a9b51f1
|
||||
Subproject commit 81de9d5a63a143c3267968d7fa5ec13db622d268
|
@ -1,11 +1,11 @@
|
||||
From f2d863aa87a12f7611d7d1910597e41b89ce8c85 Mon Sep 17 00:00:00 2001
|
||||
From a82fa6af350ae6373c36f1327adb7a929af5b87d 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
|
||||
|
||||
|
||||
diff --git a/bootstrap/src/main/java/net/md_5/bungee/BungeeCordLauncher.java b/bootstrap/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
||||
index 3c1bbe9..5e1773c 100644
|
||||
index 3c1bbe93..5e1773c3 100644
|
||||
--- a/bootstrap/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
||||
+++ b/bootstrap/src/main/java/net/md_5/bungee/BungeeCordLauncher.java
|
||||
@@ -42,7 +42,7 @@ public class BungeeCordLauncher
|
||||
@ -27,7 +27,7 @@ index 3c1bbe9..5e1773c 100644
|
||||
|
||||
if ( !options.has( "noconsole" ) )
|
||||
diff --git a/log/src/main/java/net/md_5/bungee/log/LogDispatcher.java b/log/src/main/java/net/md_5/bungee/log/LogDispatcher.java
|
||||
index f1ccd4f..d703d6d 100644
|
||||
index f1ccd4f6..d703d6d2 100644
|
||||
--- a/log/src/main/java/net/md_5/bungee/log/LogDispatcher.java
|
||||
+++ b/log/src/main/java/net/md_5/bungee/log/LogDispatcher.java
|
||||
@@ -12,7 +12,7 @@ public class LogDispatcher extends Thread
|
||||
@ -40,7 +40,7 @@ index f1ccd4f..d703d6d 100644
|
||||
}
|
||||
|
||||
diff --git a/proxy/src/main/java/Test.java b/proxy/src/main/java/Test.java
|
||||
index 9d51608..446dfe2 100644
|
||||
index 9d51608d..446dfe2f 100644
|
||||
--- a/proxy/src/main/java/Test.java
|
||||
+++ b/proxy/src/main/java/Test.java
|
||||
@@ -19,7 +19,7 @@ public class Test
|
||||
@ -53,7 +53,7 @@ index 9d51608..446dfe2 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 159dab6..5b01030 100644
|
||||
index 9fdb4c76..2fd36e8f 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -177,7 +177,7 @@ public class BungeeCord extends ProxyServer
|
||||
@ -65,7 +65,7 @@ index 159dab6..5b01030 100644
|
||||
|
||||
System.setSecurityManager( new BungeeSecurityManager() );
|
||||
|
||||
@@ -462,7 +462,7 @@ public class BungeeCord extends ProxyServer
|
||||
@@ -469,7 +469,7 @@ public class BungeeCord extends ProxyServer
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
@ -75,7 +75,7 @@ index 159dab6..5b01030 100644
|
||||
|
||||
@Override
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/command/CommandBungee.java b/proxy/src/main/java/net/md_5/bungee/command/CommandBungee.java
|
||||
index b079879..b26035c 100644
|
||||
index b0798791..b26035cf 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/command/CommandBungee.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/command/CommandBungee.java
|
||||
@@ -16,6 +16,6 @@ public class CommandBungee extends Command
|
||||
@ -87,7 +87,7 @@ index b079879..b26035c 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/command/CommandReload.java b/proxy/src/main/java/net/md_5/bungee/command/CommandReload.java
|
||||
index cbbe03c..4a49241 100644
|
||||
index cbbe03c7..4a492414 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/command/CommandReload.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/command/CommandReload.java
|
||||
@@ -22,7 +22,7 @@ public class CommandReload extends Command
|
||||
@ -101,7 +101,7 @@ index cbbe03c..4a49241 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
||||
index c7547c7..82ff91a 100644
|
||||
index c7547c7f..82ff91ae 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/conf/YamlConfig.java
|
||||
@@ -200,7 +200,7 @@ public class YamlConfig implements ConfigurationAdapter
|
||||
@ -114,5 +114,5 @@ index c7547c7..82ff91a 100644
|
||||
InetSocketAddress address = Util.getAddr( addr );
|
||||
ServerInfo info = ProxyServer.getInstance().constructServerInfo( name, address, motd, restricted );
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 443adb7224757f0011a64b8e4a644af493d97c97 Mon Sep 17 00:00:00 2001
|
||||
From dbda96c0e643167a28b173be02282cd92ab43046 Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@outlook.com>
|
||||
Date: Mon, 14 Mar 2016 15:40:44 -0700
|
||||
Subject: [PATCH] Optimize uuid conversions
|
||||
@ -8,7 +8,7 @@ Manually decode uuids to and from hex.
|
||||
|
||||
diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java b/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java
|
||||
new file mode 100644
|
||||
index 0000000..ece5f79
|
||||
index 00000000..ece5f798
|
||||
--- /dev/null
|
||||
+++ b/api/src/main/java/io/github/waterfallmc/waterfall/utils/Hex.java
|
||||
@@ -0,0 +1,113 @@
|
||||
@ -128,7 +128,7 @@ index 0000000..ece5f79
|
||||
\ No newline at end of file
|
||||
diff --git a/api/src/main/java/io/github/waterfallmc/waterfall/utils/UUIDUtils.java b/api/src/main/java/io/github/waterfallmc/waterfall/utils/UUIDUtils.java
|
||||
new file mode 100644
|
||||
index 0000000..cc24dd3
|
||||
index 00000000..cc24dd35
|
||||
--- /dev/null
|
||||
+++ b/api/src/main/java/io/github/waterfallmc/waterfall/utils/UUIDUtils.java
|
||||
@@ -0,0 +1,74 @@
|
||||
@ -208,7 +208,7 @@ index 0000000..cc24dd3
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/api/src/main/java/net/md_5/bungee/Util.java b/api/src/main/java/net/md_5/bungee/Util.java
|
||||
index 86a0055..6c9c6d6 100644
|
||||
index 86a00555..6c9c6d61 100644
|
||||
--- a/api/src/main/java/net/md_5/bungee/Util.java
|
||||
+++ b/api/src/main/java/net/md_5/bungee/Util.java
|
||||
@@ -1,11 +1,15 @@
|
||||
@ -245,7 +245,7 @@ index 86a0055..6c9c6d6 100644
|
||||
}
|
||||
}
|
||||
diff --git a/api/src/main/java/net/md_5/bungee/api/ServerPing.java b/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
||||
index 27b5184..8bf17f9 100644
|
||||
index 27b51849..8bf17f9c 100644
|
||||
--- a/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
||||
+++ b/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
||||
@@ -75,7 +75,7 @@ public class ServerPing
|
||||
@ -258,10 +258,10 @@ index 27b5184..8bf17f9 100644
|
||||
}
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index d87b03c..3c33b5b 100644
|
||||
index 9852a0a0..0353f954 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -603,7 +603,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -597,7 +597,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public String getUUID()
|
||||
{
|
||||
@ -271,5 +271,5 @@ index d87b03c..3c33b5b 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 172b1feaee98c58f898bb3bf5abd7ebaf5f0fcb7 Mon Sep 17 00:00:00 2001
|
||||
From 4b5a5536a11e57f0153f1b6d4178da506552b5e2 Mon Sep 17 00:00:00 2001
|
||||
From: Tux <write@imaginarycode.com>
|
||||
Date: Thu, 19 May 2016 18:05:33 -0600
|
||||
Subject: [PATCH] Micro-optimizations
|
||||
@ -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 a0f2c55a..ac272720 100644
|
||||
index 71de54ef..745f0428 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -480,7 +480,9 @@ public class BungeeCord extends ProxyServer
|
||||
@@ -487,7 +487,9 @@ public class BungeeCord extends ProxyServer
|
||||
String translation = "<translation '" + name + "' missing>";
|
||||
try
|
||||
{
|
||||
@ -46,10 +46,10 @@ index a0f2c55a..ac272720 100644
|
||||
{
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
index 721d48a9..812d9379 100644
|
||||
index f1ac3a8c..87e9e239 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
@@ -556,7 +556,7 @@ public final class UserConnection implements ProxiedPlayer
|
||||
@@ -548,7 +548,7 @@ public final class UserConnection implements ProxiedPlayer
|
||||
@Override
|
||||
public Locale getLocale()
|
||||
{
|
||||
@ -79,5 +79,5 @@ index c0a5061a..ce32f6b1 100644
|
||||
String subChannel = in.readUTF();
|
||||
|
||||
--
|
||||
2.11.0.windows.1
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 30c3351f48c0aef697e237a476771268e42e3231 Mon Sep 17 00:00:00 2001
|
||||
From 56e3108c0a0c095cb85ad542c0d755de22b29191 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.
|
||||
@ -9,7 +9,7 @@ This avoids spamming the logs with connection notices.
|
||||
Server list pings are only logged if the log_server_list_pings config.yml option is true, defaults to false
|
||||
|
||||
diff --git a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
||||
index 66d0b8a..5a49050 100644
|
||||
index 66d0b8a1..5a49050a 100644
|
||||
--- a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
||||
+++ b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
||||
@@ -89,6 +89,11 @@ public interface ProxyConfig
|
||||
@ -25,7 +25,7 @@ index 66d0b8a..5a49050 100644
|
||||
|
||||
/**
|
||||
diff --git a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
||||
index e56d359..68f2546 100644
|
||||
index e56d3591..68f25460 100644
|
||||
--- a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
||||
+++ b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
||||
@@ -16,6 +16,13 @@ public class WaterfallConfiguration extends Configuration {
|
||||
@ -61,7 +61,7 @@ index e56d359..68f2546 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 ed057b8..a37f3ea 100644
|
||||
index ed057b8a..a37f3ea3 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
||||
@@ -382,6 +382,6 @@ public class ServerConnector extends PacketHandler
|
||||
@ -73,7 +73,7 @@ index ed057b8..a37f3ea 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
index ce32f6b..470f0be 100644
|
||||
index ce32f6b1..470f0bef 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
||||
@@ -510,6 +510,6 @@ public class DownstreamBridge extends PacketHandler
|
||||
@ -85,10 +85,10 @@ index ce32f6b..470f0be 100644
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index 3c33b5b..90b27c0 100644
|
||||
index 0353f954..915b4152 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -281,19 +281,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -280,19 +280,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
}
|
||||
|
||||
this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );
|
||||
@ -112,7 +112,7 @@ index 3c33b5b..90b27c0 100644
|
||||
thisState = State.USERNAME;
|
||||
ch.setProtocol( Protocol.LOGIN );
|
||||
|
||||
@@ -609,7 +612,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -603,7 +606,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@ -122,7 +122,7 @@ index 3c33b5b..90b27c0 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 654be21..618e76e 100644
|
||||
index 654be214..618e76e3 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
|
||||
@@ -213,6 +213,6 @@ public class UpstreamBridge extends PacketHandler
|
||||
@ -134,5 +134,5 @@ index 654be21..618e76e 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6a3c1b34836f5e7c148839a630ac8f416394284e Mon Sep 17 00:00:00 2001
|
||||
From eccac24c6bbc21f25e308135b3061885dd4f1fa9 Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@outlook.com>
|
||||
Date: Sun, 7 Feb 2016 00:01:19 -0700
|
||||
Subject: [PATCH] Add a property to accept invalid ping packets
|
||||
@ -9,10 +9,10 @@ You can enable it by setting '-Dwaterfall.acceptInvalidPackets=true' at the comm
|
||||
Fixes #23
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index 90b27c0..f18ab46 100644
|
||||
index 915b4152..875ac5e3 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -247,10 +247,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@@ -246,10 +246,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
thisState = State.PING;
|
||||
}
|
||||
|
||||
@ -29,5 +29,5 @@ index 90b27c0..f18ab46 100644
|
||||
disconnect( "" );
|
||||
}
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 225f314f6660580b82c2dcecc658b572eeec55e8 Mon Sep 17 00:00:00 2001
|
||||
From 036ded4348c14c4dd437ed4725fe3243862d20c8 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 64a0dc5..12c7cc1 100644
|
||||
index 745f0428..a90beaf7 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -110,7 +110,7 @@ public class BungeeCord extends ProxyServer
|
||||
@ -48,7 +48,7 @@ index 64a0dc5..12c7cc1 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -395,12 +396,14 @@ public class BungeeCord extends ProxyServer
|
||||
@@ -402,12 +403,14 @@ public class BungeeCord extends ProxyServer
|
||||
}
|
||||
|
||||
getLogger().info( "Closing IO threads" );
|
||||
@ -70,7 +70,7 @@ index 64a0dc5..12c7cc1 100644
|
||||
|
||||
if ( reconnectHandler != null )
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java b/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
|
||||
index bc56d4f..efcba31 100644
|
||||
index bc56d4f3..efcba311 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
|
||||
@@ -145,7 +145,7 @@ public class BungeeServerInfo implements ServerInfo
|
||||
@ -83,5 +83,5 @@ index bc56d4f..efcba31 100644
|
||||
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000 ) // TODO: Configurable
|
||||
.remoteAddress( getAddress() )
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e909df719847e5263bbd50644914a19cb55fd29e Mon Sep 17 00:00:00 2001
|
||||
From f56b491d0446e50c02dfc076242a1e9133f7bd88 Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@techcable.net>
|
||||
Date: Fri, 18 Mar 2016 10:53:24 -0700
|
||||
Subject: [PATCH] Better Decompression Sanity
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Better Decompression Sanity
|
||||
Fixes #40
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java b/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
|
||||
index 21b3ea2..37fe6ac 100644
|
||||
index 21b3ea2b..37fe6ac7 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/compress/PacketDecompressor.java
|
||||
@@ -1,5 +1,7 @@
|
||||
@ -45,10 +45,10 @@ index 21b3ea2..37fe6ac 100644
|
||||
out.add( decompressed );
|
||||
decompressed = null;
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
index 0b0dd73..ba8f940 100644
|
||||
index 28a4f176..0107ac03 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
@@ -122,7 +122,7 @@ public class ChannelWrapper
|
||||
@@ -136,7 +136,7 @@ public class ChannelWrapper
|
||||
|
||||
if ( ch.pipeline().get( PacketDecompressor.class ) == null && compressionThreshold != -1 )
|
||||
{
|
||||
@ -58,5 +58,5 @@ index 0b0dd73..ba8f940 100644
|
||||
if ( compressionThreshold == -1 )
|
||||
{
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From af9943d555d07bc98a381d8ca661181b7f7696d0 Mon Sep 17 00:00:00 2001
|
||||
From 084d0ab4686c9a754034d2aeb7aea7098647107d 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.
|
||||
@ -144,10 +144,10 @@ index 967a1b2a..08aa6981 100644
|
||||
{
|
||||
int index = path.indexOf( SEPARATOR );
|
||||
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 c227396f..f392a281 100644
|
||||
index 520377cc..9c5bccb0 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -565,10 +565,18 @@ public class BungeeCord extends ProxyServer
|
||||
@@ -572,10 +572,18 @@ public class BungeeCord extends ProxyServer
|
||||
return config.getServers();
|
||||
}
|
||||
|
||||
@ -285,5 +285,5 @@ index db9ebbdd..4d16fa3a 100644
|
||||
+ // Waterfall end
|
||||
}
|
||||
--
|
||||
2.11.0.windows.1
|
||||
2.11.0
|
||||
|
||||
|
@ -1,22 +1,31 @@
|
||||
From 8b9b91fa1167cef1ae3ee78dd06e94125ebb64dc Mon Sep 17 00:00:00 2001
|
||||
From 0862ba1ee5c047fbf6db4594d9196dc886a6238d Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@techcable.net>
|
||||
Date: Mon, 6 Jun 2016 13:36:10 -0600
|
||||
Subject: [PATCH] Don't send KICK packets while in HANDSHAKE state
|
||||
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index f18ab46..88bc825 100644
|
||||
index 875ac5e3..fce9ca9d 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -551,7 +551,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
- if ( thisState != State.STATUS && thisState != State.PING )
|
||||
+ if ( thisState != State.STATUS && thisState != State.PING && thisState != State.HANDSHAKE ) // Waterfall: Don't kick during handshake
|
||||
{
|
||||
unsafe().sendPacket( new Kick( ComponentSerializer.toString( reason ) ) );
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
this.handshake = handshake;
|
||||
ch.setVersion( handshake.getProtocolVersion() );
|
||||
|
||||
- // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes
|
||||
+ // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes
|
||||
// with Bungee's IP forwarding, so we detect it, and remove it from the host string, for now.
|
||||
// We know FML appends \00FML\00. However, we need to also consider that other systems might
|
||||
// add their own data to the end of the string. So, we just take everything from the \0 character
|
||||
@@ -544,7 +544,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public void disconnect(final BaseComponent... reason)
|
||||
{
|
||||
- if ( thisState != State.STATUS && thisState != State.PING )
|
||||
+ if ( thisState != State.STATUS && thisState != State.PING && thisState != State.HANDSHAKE ) // Waterfall: Don't kick during handshake
|
||||
{
|
||||
ch.delayedClose( new Kick( ComponentSerializer.toString( reason ) ) );
|
||||
} else
|
||||
--
|
||||
2.10.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 991054ce0e216db5a84832d9f2f7c26566b2fc49 Mon Sep 17 00:00:00 2001
|
||||
From d8090cf8f33c6710061d3371372ba36e4b91f6b0 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 f392a281..4a33b9de 100644
|
||||
index 9c5bccb0..a6fd37a8 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
|
||||
@@ -614,7 +614,7 @@ public class BungeeCord extends ProxyServer
|
||||
@@ -621,7 +621,7 @@ public class BungeeCord extends ProxyServer
|
||||
@Override
|
||||
public String getGameVersion()
|
||||
{
|
||||
@ -72,5 +72,5 @@ index f392a281..4a33b9de 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.11.0.windows.1
|
||||
2.11.0
|
||||
|
||||
|
@ -1,340 +0,0 @@
|
||||
From 0baef4f983c44c464e3fd72bf7828998b3e79605 Mon Sep 17 00:00:00 2001
|
||||
From: kamcio96 <k.nadworski@icloud.com>
|
||||
Date: Sun, 15 Jan 2017 09:51:55 -0700
|
||||
Subject: [PATCH] Improve connection closing, fixing the kick delay.
|
||||
|
||||
Merges some of SpigotMC/BungeeCord#1706 by @kamcio96.
|
||||
|
||||
@kamcio96 claims that these channel closing changes are removing the
|
||||
need of delayed kick packets
|
||||
@Janmm14 can confirm this (at login state) on a no-latency and
|
||||
low-latency connection (<1ms; ~16ms), high-latency connection was not
|
||||
tested, but it should work on these too.
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnection.java b/proxy/src/main/java/net/md_5/bungee/ServerConnection.java
|
||||
index 8c1260a..517ec77 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnection.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnection.java
|
||||
@@ -54,14 +54,7 @@ public class ServerConnection implements Server
|
||||
|
||||
if ( !ch.isClosed() )
|
||||
{
|
||||
- ch.getHandle().eventLoop().schedule( new Runnable()
|
||||
- {
|
||||
- @Override
|
||||
- public void run()
|
||||
- {
|
||||
- ch.getHandle().close();
|
||||
- }
|
||||
- }, 100, TimeUnit.MILLISECONDS );
|
||||
+ ch.close();
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
index 3566563..4084693 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
|
||||
@@ -1,10 +1,24 @@
|
||||
package net.md_5.bungee;
|
||||
|
||||
+import lombok.*;
|
||||
+
|
||||
+import java.net.InetSocketAddress;
|
||||
+import java.util.Collection;
|
||||
+import java.util.Collections;
|
||||
+import java.util.HashSet;
|
||||
+import java.util.LinkedList;
|
||||
+import java.util.Locale;
|
||||
+import java.util.Map;
|
||||
+import java.util.Queue;
|
||||
+import java.util.UUID;
|
||||
+import java.util.logging.Level;
|
||||
+
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Multimap;
|
||||
+
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
@@ -12,20 +26,7 @@ import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
-import java.net.InetSocketAddress;
|
||||
-import java.util.Collection;
|
||||
-import java.util.Collections;
|
||||
-import java.util.HashSet;
|
||||
-import java.util.LinkedList;
|
||||
-import java.util.Locale;
|
||||
-import java.util.Map;
|
||||
-import java.util.Queue;
|
||||
-import java.util.UUID;
|
||||
-import java.util.logging.Level;
|
||||
-import lombok.Getter;
|
||||
-import lombok.NonNull;
|
||||
-import lombok.RequiredArgsConstructor;
|
||||
-import lombok.Setter;
|
||||
+
|
||||
import net.md_5.bungee.api.Callback;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@@ -57,7 +58,6 @@ import net.md_5.bungee.protocol.packet.ClientSettings;
|
||||
import net.md_5.bungee.protocol.packet.Kick;
|
||||
import net.md_5.bungee.protocol.packet.PlayerListHeaderFooter;
|
||||
import net.md_5.bungee.protocol.packet.PluginMessage;
|
||||
-import net.md_5.bungee.protocol.packet.Respawn;
|
||||
import net.md_5.bungee.protocol.packet.SetCompression;
|
||||
import net.md_5.bungee.tab.ServerUnique;
|
||||
import net.md_5.bungee.tab.TabList;
|
||||
@@ -270,7 +270,7 @@ public final class UserConnection implements ProxiedPlayer
|
||||
callback.done( false, null );
|
||||
}
|
||||
|
||||
- if ( getServer() == null && !ch.isClosing() )
|
||||
+ if ( getServer() == null && !ch.isClosed() )
|
||||
{
|
||||
throw new IllegalStateException("Cancelled ServerConnectEvent with no server or disconnect.");
|
||||
}
|
||||
@@ -378,22 +378,14 @@ public final class UserConnection implements ProxiedPlayer
|
||||
|
||||
public void disconnect0(final BaseComponent... reason)
|
||||
{
|
||||
- if ( !ch.isClosing() )
|
||||
+ if ( !ch.isClosed() )
|
||||
{
|
||||
bungee.getLogger().log( Level.INFO, "[{0}] disconnected with: {1}", new Object[]
|
||||
{
|
||||
getName(), BaseComponent.toLegacyText( reason )
|
||||
} );
|
||||
|
||||
- ch.delayedClose( new Runnable()
|
||||
- {
|
||||
-
|
||||
- @Override
|
||||
- public void run()
|
||||
- {
|
||||
- unsafe().sendPacket( new Kick( ComponentSerializer.toString( reason ) ) );
|
||||
- }
|
||||
- } );
|
||||
+ ch.close(new Kick(ComponentSerializer.toString(reason)));
|
||||
|
||||
if ( server != null )
|
||||
{
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
index 88bc825..82dbf1a 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
||||
@@ -1,8 +1,7 @@
|
||||
package net.md_5.bungee.connection;
|
||||
|
||||
-import com.google.common.base.Charsets;
|
||||
-import com.google.common.base.Preconditions;
|
||||
-import com.google.gson.Gson;
|
||||
+import lombok.*;
|
||||
+
|
||||
import java.math.BigInteger;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URLEncoder;
|
||||
@@ -12,8 +11,11 @@ import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import javax.crypto.SecretKey;
|
||||
-import lombok.Getter;
|
||||
-import lombok.RequiredArgsConstructor;
|
||||
+
|
||||
+import com.google.common.base.Charsets;
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import com.google.gson.Gson;
|
||||
+
|
||||
import net.md_5.bungee.BungeeCord;
|
||||
import net.md_5.bungee.BungeeServerInfo;
|
||||
import net.md_5.bungee.EncryptionUtil;
|
||||
@@ -28,7 +30,6 @@ import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.config.ListenerInfo;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
-import net.md_5.bungee.api.connection.Connection.Unsafe;
|
||||
import net.md_5.bungee.api.connection.PendingConnection;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.LoginEvent;
|
||||
@@ -105,13 +106,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
@Override
|
||||
public boolean shouldHandle(PacketWrapper packet) throws Exception
|
||||
{
|
||||
- return !ch.isClosing();
|
||||
+ return !ch.isClosed();
|
||||
}
|
||||
|
||||
+ @RequiredArgsConstructor
|
||||
+ @Getter
|
||||
private enum State
|
||||
{
|
||||
+ HANDSHAKE(false), STATUS(false), PING(false), USERNAME(true), ENCRYPT(true), FINISHED(true);
|
||||
|
||||
- HANDSHAKE, STATUS, PING, USERNAME, ENCRYPT, FINISHED;
|
||||
+ private final boolean allowKickPackets;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,8 +144,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
public void handle(LegacyHandshake legacyHandshake) throws Exception
|
||||
{
|
||||
this.legacy = true;
|
||||
- ch.getHandle().writeAndFlush( bungee.getTranslation( "outdated_client" ) );
|
||||
- ch.close();
|
||||
+ ch.close( bungee.getTranslation( "outdated_client" ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,8 +186,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
+ '\u00a7' + legacy.getPlayers().getMax();
|
||||
}
|
||||
|
||||
- ch.getHandle().writeAndFlush( kickMessage );
|
||||
- ch.close();
|
||||
+ ch.close( kickMessage );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -255,8 +257,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
if (!ACCEPT_INVALID_PACKETS) {
|
||||
Preconditions.checkState(thisState == State.PING, "Not expecting PING");
|
||||
}
|
||||
- unsafe.sendPacket( ping );
|
||||
- disconnect( "" );
|
||||
+ ch.close( ping );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -543,20 +544,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void disconnect(final BaseComponent... reason)
|
||||
- {
|
||||
- ch.delayedClose( new Runnable()
|
||||
- {
|
||||
-
|
||||
- @Override
|
||||
- public void run()
|
||||
- {
|
||||
- if ( thisState != State.STATUS && thisState != State.PING && thisState != State.HANDSHAKE ) // Waterfall: Don't kick during handshake
|
||||
- {
|
||||
- unsafe().sendPacket( new Kick( ComponentSerializer.toString( reason ) ) );
|
||||
- }
|
||||
- }
|
||||
- } );
|
||||
+ public void disconnect(final BaseComponent... reason) {
|
||||
+ if (thisState.isAllowKickPackets()) {
|
||||
+ ch.close(new Kick(ComponentSerializer.toString(reason)));
|
||||
+ }
|
||||
}
|
||||
|
||||
@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 9e753d5..38d12c5 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
|
||||
@@ -79,6 +79,7 @@ public class UpstreamBridge extends PacketHandler
|
||||
{
|
||||
player.unsafe().sendPacket( packet );
|
||||
}
|
||||
+ con.getServer().setObsolete(true);
|
||||
con.getServer().disconnect( "Quitting" );
|
||||
}
|
||||
}
|
||||
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
index ba8f940..50f57d9 100644
|
||||
--- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
+++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
|
||||
@@ -2,6 +2,7 @@ package net.md_5.bungee.netty;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import io.netty.channel.Channel;
|
||||
+import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandler;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -17,10 +18,11 @@ public class ChannelWrapper
|
||||
{
|
||||
|
||||
private final Channel ch;
|
||||
- @Getter
|
||||
private volatile boolean closed;
|
||||
- @Getter
|
||||
- private volatile boolean closing;
|
||||
+
|
||||
+ public boolean isClosed() {
|
||||
+ return closed || !ch.isActive();
|
||||
+ }
|
||||
|
||||
public ChannelWrapper(ChannelHandlerContext ctx)
|
||||
{
|
||||
@@ -41,7 +43,7 @@ public class ChannelWrapper
|
||||
|
||||
public void write(Object packet)
|
||||
{
|
||||
- if ( !closed )
|
||||
+ if ( !isClosed() )
|
||||
{
|
||||
if ( packet instanceof PacketWrapper )
|
||||
{
|
||||
@@ -57,40 +59,24 @@ public class ChannelWrapper
|
||||
|
||||
public void close()
|
||||
{
|
||||
- if ( !closed )
|
||||
+ if ( !isClosed() )
|
||||
{
|
||||
- closed = closing = true;
|
||||
+ closed = true;
|
||||
ch.flush();
|
||||
ch.close();
|
||||
}
|
||||
}
|
||||
|
||||
- public void delayedClose(final Runnable runnable)
|
||||
+ public void close(final Object packet)
|
||||
{
|
||||
- Preconditions.checkArgument( runnable != null, "runnable" );
|
||||
-
|
||||
- if ( !closing )
|
||||
- {
|
||||
- closing = true;
|
||||
-
|
||||
- // Minecraft client can take some time to switch protocols.
|
||||
- // Sending the wrong disconnect packet whilst a protocol switch is in progress will crash it.
|
||||
- // Delay 500ms to ensure that the protocol switch (if any) has definitely taken place.
|
||||
- ch.eventLoop().schedule( new Runnable()
|
||||
- {
|
||||
-
|
||||
- @Override
|
||||
- public void run()
|
||||
- {
|
||||
- try
|
||||
- {
|
||||
- runnable.run();
|
||||
- } finally
|
||||
- {
|
||||
- ChannelWrapper.this.close();
|
||||
- }
|
||||
- }
|
||||
- }, 500, TimeUnit.MILLISECONDS );
|
||||
+ Preconditions.checkArgument( packet != null, "packet" );
|
||||
+
|
||||
+ if ( !isClosed() ) {
|
||||
+ closed = true;
|
||||
+ ch.writeAndFlush(packet).addListeners(
|
||||
+ ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE,
|
||||
+ ChannelFutureListener.CLOSE
|
||||
+ );
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.10.2.windows.1
|
||||
|
Loading…
Reference in New Issue
Block a user