Updated Upstream (BungeeCord)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
dfd847f7 Update native libraries
a1fee720 Deprecate string join
963854f8 Remove use of internal gson API
2ef5e700 #3451: Improve length field prepending on bungee -> server connection
2e6f0dd4 #3450: Use readRetainedSlice method instead of slice+retain+skip
This commit is contained in:
Shane Freeder 2023-03-25 18:36:07 +00:00
parent 29849ac41f
commit 0dc74bb242
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
6 changed files with 28 additions and 36 deletions

@ -1 +1 @@
Subproject commit 7790783949fdb43555634d1eab232b0d6dbb6074
Subproject commit dfd847f705906ffc5be78444bf6bfa9261f6066d

View File

@ -1,17 +1,10 @@
From 9eec1e3623ac972c5502b27534f7d648b78bad75 Mon Sep 17 00:00:00 2001
From aa69ee55cd4bb1acb430cb17153c6e1bd6f0fe40 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
It returns the underlying array storage, and does *not* return a view of the buffer as an array
diff --git a/native/mbedtls b/native/mbedtls
index 8df2f8e7..e483a77c 160000
--- a/native/mbedtls
+++ b/native/mbedtls
@@ -1 +1 @@
-Subproject commit 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b
+Subproject commit e483a77c85e1f9c1dd2eb1c5a8f552d2617fe400
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PluginMessage.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/PluginMessage.java
index 70b292f0..91f71c09 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PluginMessage.java
@ -63,7 +56,7 @@ index 3be014b2..e00c5659 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 25fdc742..1059c67f 100644
index 05cdf684..cc0edeb8 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
@@ -293,7 +293,7 @@ public class DownstreamBridge extends PacketHandler
@ -76,10 +69,10 @@ index 25fdc742..1059c67f 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 56563346..61165e43 100644
index 5b9c35d1..2d6885a9 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
@@ -47,7 +47,7 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
@@ -50,7 +50,7 @@ import net.md_5.bungee.protocol.Varint21LengthFieldPrepender;
public class PipelineUtils
{
@ -89,5 +82,5 @@ index 56563346..61165e43 100644
{
@Override
--
2.38.1
2.40.0

View File

@ -1,4 +1,4 @@
From 9a4d153e6af0749088ef8668c8293d5b469cb020 Mon Sep 17 00:00:00 2001
From 209fd1c50168f4b5d5db23d0cdd7aef25366d79b Mon Sep 17 00:00:00 2001
From: Harry <me@harry5573.uk>
Date: Sun, 24 Jan 2016 15:13:29 -0700
Subject: [PATCH] Enable TCP_NODELAY.
@ -6,10 +6,10 @@ 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 61165e43..2d373660 100644
index 2d6885a9..3f30da0c 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
@@ -165,6 +165,7 @@ public class PipelineUtils
@@ -174,6 +174,7 @@ public class PipelineUtils
{
// IP_TOS is not supported (Windows XP / Windows Server 2003)
}
@ -18,5 +18,5 @@ index 61165e43..2d373660 100644
ch.config().setWriteBufferWaterMark( MARK );
--
2.32.0 (Apple Git-132)
2.40.0

View File

@ -1,4 +1,4 @@
From 0746624ff19bfb531724e96f65d9d244268bdbc1 Mon Sep 17 00:00:00 2001
From 40bdf52eae5d4d492216601188a4c54dbb00cc1c 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 ffff990a..0c9ffbf6 100644
index c036b613..f7794f66 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -120,7 +120,7 @@ public class BungeeCord extends ProxyServer
@ -70,7 +70,7 @@ index ffff990a..0c9ffbf6 100644
getLogger().info( "Thank you and goodbye" );
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 16dd8eec..1ea654f1 100644
index 51b2a324..634dfca7 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeServerInfo.java
@@ -184,7 +184,7 @@ public class BungeeServerInfo implements ServerInfo
@ -79,9 +79,9 @@ index 16dd8eec..1ea654f1 100644
.channel( PipelineUtils.getChannel( socketAddress ) )
- .group( BungeeCord.getInstance().eventLoops )
+ .group( BungeeCord.getInstance().workerEventLoopGroup )
.handler( PipelineUtils.BASE )
.handler( PipelineUtils.BASE_SERVERSIDE )
.option( ChannelOption.CONNECT_TIMEOUT_MILLIS, BungeeCord.getInstance().getConfig().getRemotePingTimeout() )
.remoteAddress( socketAddress )
--
2.38.1
2.40.0

View File

@ -1,11 +1,11 @@
From 8610fad68f5719f52367f7f2067fde61b2c806c8 Mon Sep 17 00:00:00 2001
From bc1b94faf6edb72a90f148a3638fff1de2eabcf4 Mon Sep 17 00:00:00 2001
From: creeper123123321 <creeper123123321@gmail.com>
Date: Thu, 17 Jan 2019 03:25:59 +0000
Subject: [PATCH] Don't use a bytebuf for packet decoding
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
index f297620c..c0d37142 100644
index cf7dea17..3a802ca4 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/Varint21FrameDecoder.java
@@ -27,8 +27,7 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder
@ -35,7 +35,7 @@ index f297620c..c0d37142 100644
if ( false && length == 0) // Waterfall - ignore
{
throw new CorruptedFrameException( "Empty Packet!" );
@@ -49,26 +51,11 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder
@@ -49,25 +51,11 @@ public class Varint21FrameDecoder extends ByteToMessageDecoder
{
in.resetReaderIndex();
return;
@ -43,8 +43,7 @@ index f297620c..c0d37142 100644
- {
- if ( in.hasMemoryAddress() )
- {
- out.add( in.slice( in.readerIndex(), length ).retain() );
- in.skipBytes( length );
- out.add( in.readRetainedSlice( length ) );
- } else
- {
- if ( !DIRECT_WARNING )
@ -58,7 +57,7 @@ index f297620c..c0d37142 100644
- in.readBytes( dst );
- out.add( dst );
- }
+ // Waterfall start
+ // Waterfall start
+ } else {
+ out.add(in.readRetainedSlice(length));
return;
@ -67,5 +66,5 @@ index f297620c..c0d37142 100644
}
}
--
2.30.1 (Apple Git-130)
2.40.0

View File

@ -1,4 +1,4 @@
From 69c3602785646ebd3cb76a3bc20123444f9b6e0a Mon Sep 17 00:00:00 2001
From 7bca0d049e00a28e4cedbfcccc7f02a5572ecb57 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 2 Dec 2019 11:35:17 +0000
Subject: [PATCH] ConnectionInitEvent
@ -67,7 +67,7 @@ index 00000000..6e79675f
+ }
+}
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 2d373660..2a21243b 100644
index 3f30da0c..af65e192 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
@@ -1,6 +1,7 @@
@ -78,7 +78,7 @@ index 2d373660..2a21243b 100644
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.channel.Channel;
import io.netty.channel.ChannelException;
@@ -60,7 +61,6 @@ public class PipelineUtils
@@ -63,7 +64,6 @@ public class PipelineUtils
ch.close();
return;
}
@ -86,7 +86,7 @@ index 2d373660..2a21243b 100644
ListenerInfo listener = ch.attr( LISTENER ).get();
if ( BungeeCord.getInstance().getPluginManager().callEvent( new ClientConnectEvent( remoteAddress, listener ) ).isCancelled() )
@@ -69,7 +69,21 @@ public class PipelineUtils
@@ -72,7 +72,21 @@ public class PipelineUtils
return;
}
@ -108,7 +108,7 @@ index 2d373660..2a21243b 100644
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() ) );
@@ -80,6 +94,9 @@ public class PipelineUtils
@@ -83,6 +97,9 @@ public class PipelineUtils
{
ch.pipeline().addFirst( new HAProxyMessageDecoder() );
}
@ -117,7 +117,7 @@ index 2d373660..2a21243b 100644
+ BungeeCord.getInstance().getPluginManager().callEvent(connectionInitEvent);
}
};
public static final Base BASE = new Base();
public static final Base BASE = new Base( false );
--
2.37.2
2.40.0