Merge upstream

Resolves #170
This commit is contained in:
kashike 2017-08-18 02:36:42 -07:00
parent 34068e62d8
commit 178e989894
11 changed files with 60 additions and 61 deletions

@ -1 +1 @@
Subproject commit fd675022c0dd2d8597c2f32a89d81545d99cfa9d
Subproject commit bd5a7e5b26b698c57e6f99933452bfc0659269f9

View File

@ -1,11 +1,11 @@
From 748f34eb706e5a59fc92b169d35b3e7f82f5eb24 Mon Sep 17 00:00:00 2001
From 7709afb28954b5b82ad8ef51a3d501f6a3607533 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Tue, 25 Oct 2016 11:58:37 -0400
Subject: [PATCH] Add Waterfall configuration files
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 edd82c1..b30541b 100644
index edd82c1e..b30541be 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
@@ -79,4 +79,9 @@ public interface ProxyConfig
@ -20,7 +20,7 @@ index edd82c1..b30541b 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
new file mode 100644
index 0000000..f9e277d
index 00000000..f9e277dc
--- /dev/null
+++ b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
@@ -0,0 +1,18 @@
@ -43,7 +43,7 @@ index 0000000..f9e277d
+ }
+}
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 5b01030..7bb0862 100644
index 510841c7..78808fb9 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -11,6 +11,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
@ -64,7 +64,7 @@ index 5b01030..7bb0862 100644
* Localization bundle.
*/
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 25d87d9..81dd4af 100644
index 907246a9..4a55c0e2 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
@@ -24,7 +24,7 @@ import net.md_5.bungee.util.CaseInsensitiveSet;
@ -77,7 +77,7 @@ index 25d87d9..81dd4af 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 82ff91a..4ec9782 100644
index 754ae9a7..58e6fa47 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
@@ -42,10 +42,15 @@ public class YamlConfig implements ConfigurationAdapter
@ -98,18 +98,18 @@ index 82ff91a..4ec9782 100644
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle( DumperOptions.FlowStyle.BLOCK );
yaml = new Yaml( options );
@@ -54,6 +59,11 @@ public class YamlConfig implements ConfigurationAdapter
@@ -53,6 +58,11 @@ public class YamlConfig implements ConfigurationAdapter
@Override
public void load()
{
+ {
+ load(true);
+ }
+
+ public void load(boolean doPermissions)
+ {
{
try
{
file.createNewFile();
@@ -75,6 +85,7 @@ public class YamlConfig implements ConfigurationAdapter
throw new RuntimeException( "Could not load configuration!", ex );
}
@ -119,5 +119,5 @@ index 82ff91a..4ec9782 100644
if ( permissions.isEmpty() )
{
--
2.10.0
2.14.1

View File

@ -1,4 +1,4 @@
From 309ca033db547d40909d8fb041ed5a8eaffe0a2d Mon Sep 17 00:00:00 2001
From 7079e38721fbfbd4821c240c44fd958038146041 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Tue, 3 May 2016 20:31:52 -0700
Subject: [PATCH] Don't access a ByteBuf's underlying array
@ -69,10 +69,10 @@ index 4049e815..1010f361 100644
// changes in the packet are ignored so we need to send it manually
con.unsafe().sendPacket( pluginMessage );
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index f239c7d8..384d9588 100644
index 5f4020cc..9d6a1013 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -41,9 +41,9 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
@@ -42,9 +42,9 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
public class PipelineUtils
{
@ -86,5 +86,5 @@ index f239c7d8..384d9588 100644
{
@Override
--
2.13.4
2.14.1

View File

@ -1,4 +1,4 @@
From fd00d6cac0a91f0b160af2396292583facd44090 Mon Sep 17 00:00:00 2001
From 19a82b71af00438f105225ef33ba602c03980c37 Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Wed, 24 Feb 2016 17:16:23 +0000
Subject: [PATCH] Enable TCP_NODELAY.
@ -6,17 +6,17 @@ Subject: [PATCH] Enable TCP_NODELAY.
This is enabled by default on CraftBukkit/Spigot >= 1.8 and may help with network performance.
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 384d9588..67624b35 100644
index 9d6a1013..5eeab8b5 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -128,6 +128,7 @@ public class PipelineUtils
@@ -133,6 +133,7 @@ public class PipelineUtils
{
// IP_TOS is not supported (Windows XP / Windows Server 2003)
}
+ ch.config().setOption( ChannelOption.TCP_NODELAY, true );
ch.config().setAllocator( PooledByteBufAllocator.DEFAULT );
ch.config().setWriteBufferWaterMark( MARK );
ch.pipeline().addLast( TIMEOUT_HANDLER, new ReadTimeoutHandler( BungeeCord.getInstance().config.getTimeout(), TimeUnit.MILLISECONDS ) );
--
2.13.4
2.14.1

View File

@ -1,4 +1,4 @@
From 322a8e05f4993315d83912370aba80ccdb6d0338 Mon Sep 17 00:00:00 2001
From 9df293758781b8339407ae80df62e0f091821188 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@techcable.net>
Date: Thu, 19 May 2016 17:09:22 -0600
Subject: [PATCH] Allow invalid packet ids for forge servers
@ -49,12 +49,12 @@ index 61e2b42d..c92a922a 100644
+ }
+
public final DefinedPacket createPacket(int id, int version)
{
+ {
+ return createPacket(id, version, true);
+ }
+
+ public final DefinedPacket createPacket(int id, int version, boolean supportsForge)
+ {
{
ProtocolData protocolData = getProtocolData( version );
if (protocolData == null)
{
@ -122,5 +122,5 @@ index 3e0ec0d5..a6d9310f 100644
{
rewriteInt( packet, oldId, newId, readerIndex + packetIdLength );
--
2.13.4
2.14.1

View File

@ -1,11 +1,11 @@
From d8a4843bb21d6878bf71cc1acff155ffce7d28e8 Mon Sep 17 00:00:00 2001
From c1900744f556a04f6c65ebb14bea70873a03847d Mon Sep 17 00:00:00 2001
From: Johannes Donath <johannesd@torchmind.com>
Date: Sat, 4 Jul 2015 06:31:33 +0200
Subject: [PATCH] Add basic support for configurable tab-complete throttling
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 293ec4e..66d0b8a 100644
index 293ec4e3..66d0b8a1 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
@@ -88,4 +88,13 @@ public interface ProxyConfig
@ -23,7 +23,7 @@ index 293ec4e..66d0b8a 100644
+ int getTabThrottle();
}
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 056b804..e56d359 100644
index 056b8040..e56d3591 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,16 +16,36 @@ public class WaterfallConfiguration extends Configuration {
@ -64,10 +64,10 @@ index 056b804..e56d359 100644
+ }
}
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 92d1da0..654be21 100644
index 167f1f88..02a4ca37 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
@@ -31,6 +31,8 @@ public class UpstreamBridge extends PacketHandler
@@ -32,6 +32,8 @@ public class UpstreamBridge extends PacketHandler
private final ProxyServer bungee;
private final UserConnection con;
@ -76,7 +76,7 @@ index 92d1da0..654be21 100644
public UpstreamBridge(ProxyServer bungee, UserConnection con)
{
this.bungee = bungee;
@@ -128,6 +130,16 @@ public class UpstreamBridge extends PacketHandler
@@ -145,6 +147,16 @@ public class UpstreamBridge extends PacketHandler
@Override
public void handle(TabCompleteRequest tabComplete) throws Exception
{
@ -94,5 +94,5 @@ index 92d1da0..654be21 100644
if ( tabComplete.getCursor().startsWith( "/" ) )
--
2.10.0
2.14.1

View File

@ -1,11 +1,11 @@
From d87d823880803c530b1ec8783527ce20fb7590eb Mon Sep 17 00:00:00 2001
From 113e835fa24c514385912985cc24cc5b3eca5ed9 Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Tue, 26 Jan 2016 01:01:57 +0000
Subject: [PATCH] Don't create a new KickStringWriter for each new connection.
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/KickStringWriter.java b/protocol/src/main/java/net/md_5/bungee/protocol/KickStringWriter.java
index eda9571..e5275c7 100644
index eda9571e..e5275c76 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/KickStringWriter.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/KickStringWriter.java
@@ -1,9 +1,11 @@
@ -21,10 +21,10 @@ index eda9571..e5275c7 100644
{
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 67624b3..503adfd 100644
index 5eeab8b5..81927f7f 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -55,7 +55,7 @@ public class PipelineUtils
@@ -56,7 +56,7 @@ public class PipelineUtils
ch.pipeline().addBefore( FRAME_DECODER, LEGACY_DECODER, new LegacyDecoder() );
ch.pipeline().addAfter( FRAME_DECODER, PACKET_DECODER, new MinecraftDecoder( Protocol.HANDSHAKE, true, ProxyServer.getInstance().getProtocolVersion() ) );
ch.pipeline().addAfter( FRAME_PREPENDER, PACKET_ENCODER, new MinecraftEncoder( Protocol.HANDSHAKE, true, ProxyServer.getInstance().getProtocolVersion() ) );
@ -33,7 +33,7 @@ index 67624b3..503adfd 100644
ch.pipeline().get( HandlerBoss.class ).setHandler( new InitialHandler( BungeeCord.getInstance(), listener ) );
if ( listener.isProxyProtocol() )
@@ -76,6 +76,7 @@ public class PipelineUtils
@@ -77,6 +77,7 @@ public class PipelineUtils
public static final String FRAME_PREPENDER = "frame-prepender";
public static final String LEGACY_DECODER = "legacy-decoder";
public static final String LEGACY_KICKER = "legacy-kick";
@ -42,5 +42,5 @@ index 67624b3..503adfd 100644
private static boolean epoll;
--
2.7.4 (Apple Git-66)
2.14.1

View File

@ -1,4 +1,4 @@
From 8990b190d9faa10635ea9e20fd1647b9af6beb77 Mon Sep 17 00:00:00 2001
From 93f11d0a72f6eaae08ff78ec356db302aeb53919 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.
@ -122,10 +122,10 @@ index 2f0cd28d..7ab4d042 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 654be214..618e76e3 100644
index 02a4ca37..2526ef16 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
@@ -230,6 +230,6 @@ public class UpstreamBridge extends PacketHandler
@Override
public String toString()
{
@ -134,5 +134,5 @@ index 654be214..618e76e3 100644
}
}
--
2.13.4
2.14.1

View File

@ -1,4 +1,4 @@
From 68af736ef6664d9e53c126cc7e43fbc6ec60afa7 Mon Sep 17 00:00:00 2001
From a294666b73306af83ef4b4416721a0d67754272b Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Tue, 25 Oct 2016 12:34:41 -0400
Subject: [PATCH] Validate that chat messages are non-blank
@ -6,7 +6,7 @@ Subject: [PATCH] Validate that chat messages are non-blank
diff --git a/proxy/src/main/java/io/github/waterfallmc/waterfall/StringUtil.java b/proxy/src/main/java/io/github/waterfallmc/waterfall/StringUtil.java
new file mode 100644
index 0000000..d294dda
index 00000000..940ad806
--- /dev/null
+++ b/proxy/src/main/java/io/github/waterfallmc/waterfall/StringUtil.java
@@ -0,0 +1,22 @@
@ -32,9 +32,8 @@ index 0000000..d294dda
+ return true;
+ }
+}
\ No newline at end of file
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 618e76e..9e753d5 100644
index 2526ef16..6b79875d 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
@@ -1,6 +1,7 @@
@ -42,10 +41,10 @@ index 618e76e..9e753d5 100644
import com.google.common.base.Preconditions;
+import io.github.waterfallmc.waterfall.StringUtil;
import io.netty.channel.Channel;
import java.util.ArrayList;
import java.util.List;
import net.md_5.bungee.BungeeCord;
@@ -114,6 +115,7 @@ public class UpstreamBridge extends PacketHandler
@@ -131,6 +132,7 @@ public class UpstreamBridge extends PacketHandler
{
int maxLength = ( con.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_11 ) ? 256 : 100;
Preconditions.checkArgument( chat.getMessage().length() <= maxLength, "Chat message too long" ); // Mojang limit, check on updates
@ -54,5 +53,5 @@ index 618e76e..9e753d5 100644
ChatEvent chatEvent = new ChatEvent( con, con.getServer(), chat.getMessage() );
if ( !bungee.getPluginManager().callEvent( chatEvent ).isCancelled() )
--
2.10.0
2.14.1

View File

@ -1,4 +1,4 @@
From d3dccce243eced81e3a907f92df37ea5d1ceebe2 Mon Sep 17 00:00:00 2001
From 1463032538618e57bb22aee7125c75cb3f424471 Mon Sep 17 00:00:00 2001
From: Nathan Poirier <nathan@poirier.io>
Date: Tue, 28 Jun 2016 23:00:49 -0500
Subject: [PATCH] Improve ServerKickEvent
@ -44,12 +44,12 @@ index 0e1ef5c4..ee63732d 100644
+ // Waterfall start
+ @Deprecated
public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, State state)
{
+ {
+ this( player, kickedFrom, kickReasonComponent, cancelServer, state, Cause.UNKNOWN );
+ }
+
+ public ServerKickEvent(ProxiedPlayer player, ServerInfo kickedFrom, BaseComponent[] kickReasonComponent, ServerInfo cancelServer, State state, Cause cause)
+ {
{
this.player = player;
this.kickedFrom = kickedFrom;
this.kickReasonComponent = kickReasonComponent;
@ -146,5 +146,5 @@ index c2e751be..0d8ae30f 100644
{
con.connectNow( event.getCancelServer() );
--
2.13.4
2.14.1

View File

@ -1,4 +1,4 @@
From 76a25a666157c1d1fa94ddf7a46e7232aee60e56 Mon Sep 17 00:00:00 2001
From 2ea46da982edc6ff0c8e60c7d47f57c89ac1193c Mon Sep 17 00:00:00 2001
From: Tux <write@imaginarycode.com>
Date: Wed, 21 Dec 2016 03:13:03 -0500
Subject: [PATCH] Optionally use async Netty DNS resolver
@ -6,7 +6,7 @@ Subject: [PATCH] Optionally use async Netty DNS resolver
We no longer need to cache the address for the session server now.
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 a443614..43519ce 100644
index a4436141..43519ce1 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
@@ -173,6 +173,11 @@ public interface ProxyConfig
@ -22,7 +22,7 @@ index a443614..43519ce 100644
/**
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 98656fe..ae6ee15 100644
index 7aedbc45..1a5d036d 100644
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -41,6 +41,14 @@
@ -41,7 +41,7 @@ index 98656fe..ae6ee15 100644
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
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 5983581..7dc3c2d 100644
index 59835815..7dc3c2d9 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
@@ -33,6 +33,13 @@ public class WaterfallConfiguration extends Configuration {
@ -67,7 +67,7 @@ index 5983581..7dc3c2d 100644
@Override
diff --git a/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java b/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java
index 2feb4d6..b265bb4 100644
index 2feb4d66..b265bb43 100644
--- a/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java
+++ b/proxy/src/main/java/net/md_5/bungee/http/HttpClient.java
@@ -28,6 +28,10 @@ public class HttpClient
@ -157,10 +157,10 @@ index 2feb4d6..b265bb4 100644
+ // Waterfall End
}
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
index 503adfd..ad47dbb 100644
index 81927f7f..4e0ae3dc 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/PipelineUtils.java
@@ -111,7 +111,7 @@ public class PipelineUtils
@@ -112,7 +112,7 @@ public class PipelineUtils
return epoll ? EpollSocketChannel.class : NioSocketChannel.class;
}
@ -170,5 +170,5 @@ index 503adfd..ad47dbb 100644
return epoll ? EpollDatagramChannel.class : NioDatagramChannel.class;
}
--
2.7.1.windows.2
2.14.1