fix timeout being detected by the firewall system

This commit is contained in:
linsaftw 2022-07-14 17:04:01 -03:00
parent 39622ac5c9
commit 544492fb63
11 changed files with 80 additions and 70 deletions

View File

@ -1,4 +1,4 @@
From a8d52e032cf7360eccb8b5b1cf3530a5563551bd Mon Sep 17 00:00:00 2001
From 2cd7efb81fd991e0da79090038a0abc6192d4dbb Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Thu, 30 Sep 2021 19:54:33 -0300
Subject: [PATCH] 1.7.x support
@ -915,7 +915,7 @@ index a5555f6a..09dc67f9 100644
buf.writeByte( mode );
if ( mode == 0 || mode == 2 )
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 fc1a2b94..c0a02d4d 100644
index 3ee1464b..14a4197c 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -170,6 +170,14 @@ public class BungeeCord extends ProxyServer
@ -1168,7 +1168,7 @@ index 97c4b210..6082d40c 100644
con.unsafe().sendPacket( pluginMessage );
throw CancelSendSignal.INSTANCE;
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 ed1fe41a..7ddda6c3 100644
index 24893418..d1bcfadb 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
@@ -3,6 +3,9 @@ package net.md_5.bungee.connection;
@ -1181,7 +1181,7 @@ index ed1fe41a..7ddda6c3 100644
import java.math.BigInteger;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
@@ -259,8 +262,23 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -279,8 +282,23 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void done(ProxyPingEvent pingResult, Throwable error)
{
@ -1621,5 +1621,5 @@ index daf12f74..7d053485 100644
@Override
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From dc40048d350211b27c7418575f25b5bc90325626 Mon Sep 17 00:00:00 2001
From 2e498d47fb1f9745b08b5cd91c8117892dfd90e4 Mon Sep 17 00:00:00 2001
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
Date: Wed, 16 Dec 2020 17:57:23 +0800
Subject: [PATCH] Make PlayerHandshakeEvent cancellable
@ -35,10 +35,10 @@ index 2f7b38d9..e29b0ed3 100644
/**
* Connection attempting to login.
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 134c8a1d..3372fb71 100644
index d1bcfadb..c5965c0f 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
@@ -340,7 +340,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -360,7 +360,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );
@ -52,5 +52,5 @@ index 134c8a1d..3372fb71 100644
switch ( handshake.getRequestedProtocol() )
{
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,17 +1,17 @@
From 3eb1986d6a7a41e141243a72281ca574cc258bca Mon Sep 17 00:00:00 2001
From 71299ecf762c2761414305e82f430a416a513f88 Mon Sep 17 00:00:00 2001
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
Date: Wed, 16 Dec 2020 18:06:17 +0800
Subject: [PATCH] Close connections & Don't flush if not necessary
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 3372fb71..02e36035 100644
index c5965c0f..b53ee6f7 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
@@ -197,6 +197,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
@@ -207,6 +207,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
ServerPing legacy = result.getResponse();
ServerPing legacy = result.getResponse();
+
+ // FlameCord - Close and return if legacy == null
+ if (legacy == null) {
@ -19,10 +19,10 @@ index 3372fb71..02e36035 100644
+ return;
+ }
+
String kickMessage;
String kickMessage;
if ( v1_5 )
@@ -262,6 +269,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( v1_5 )
@@ -282,6 +289,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void done(ProxyPingEvent pingResult, Throwable error)
{
@ -40,7 +40,7 @@ index 3372fb71..02e36035 100644
// FlameCord start - 1.7.x support
Gson gson = handshake.getProtocolVersion() == ProtocolConstants.MINECRAFT_1_7_2 ? BungeeCord.getInstance().gsonLegacy : BungeeCord.getInstance().gson;
if ( ProtocolConstants.isBeforeOrEq( handshake.getProtocolVersion() , ProtocolConstants.MINECRAFT_1_8 ) )
@@ -306,11 +324,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -326,11 +344,13 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void handle(PingPacket ping) throws Exception
{
@ -58,7 +58,7 @@ index 3372fb71..02e36035 100644
}
@Override
@@ -644,7 +664,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -664,7 +684,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
if ( canSendKickMessage() )
{
@ -175,5 +175,5 @@ index b2b19996..b1ecb7ef 100644
}
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,14 +1,14 @@
From e1a764e21fc1c6329271b609847e4850688ab05f Mon Sep 17 00:00:00 2001
From f50800ffe1780e78e2ac40377f98b906e1121fc7 Mon Sep 17 00:00:00 2001
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
Date: Wed, 16 Dec 2020 18:35:33 +0800
Subject: [PATCH] Allow custom uuids even if onlineMode is true
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 02e36035..faa548b2 100644
index b53ee6f7..28761766 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
@@ -722,7 +722,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -742,7 +742,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
public void setUniqueId(UUID uuid)
{
Preconditions.checkState( thisState == State.USERNAME, "Can only set uuid while state is username" );
@ -18,5 +18,5 @@ index 02e36035..faa548b2 100644
}
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,14 +1,14 @@
From 09ed510ba131556b9b64e52d4adf1b5836f537fe Mon Sep 17 00:00:00 2001
From 98697593accf0d992c113a81c1ab3a67e2807048 Mon Sep 17 00:00:00 2001
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
Date: Wed, 16 Dec 2020 18:43:17 +0800
Subject: [PATCH] Don't declare uuid unless it's 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 faa548b2..fb9a8a19 100644
index 28761766..80d8ab24 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
@@ -532,7 +532,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -552,7 +552,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
loginProfile = obj;
name = obj.getName();
@ -21,5 +21,5 @@ index faa548b2..fb9a8a19 100644
return;
}
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From 36c2b4b28806f491a6fa680be25afe6ba03179f1 Mon Sep 17 00:00:00 2001
From 7dd527ef1aac693470f03f18b8a276147e909099 Mon Sep 17 00:00:00 2001
From: Juan Cruz Linsalata <LinsaFTW@users.noreply.github.com>
Date: Mon, 12 Oct 2020 15:40:53 -0300
Subject: [PATCH] FlameCord General Patch
@ -205,7 +205,7 @@ index 00000000..91d60bfb
+ }
+}
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 cd34f29f..824dfca8 100644
index 14a4197c..eb53d9aa 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -9,6 +9,8 @@ import com.google.common.collect.Sets;
@ -285,7 +285,7 @@ index 9067b806..cb98a8ea 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 5293552d..89b4122c 100644
index 94702434..e48f7713 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -35,6 +35,7 @@ import net.md_5.bungee.api.SkinConfiguration;
@ -319,7 +319,7 @@ index 5293552d..89b4122c 100644
b.connect().addListener( listener );
}
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 72328eed..0957c1f1 100644
index 80d8ab24..3bf47365 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
@@ -20,6 +20,8 @@ import java.util.logging.Level;
@ -331,7 +331,7 @@ index 72328eed..0957c1f1 100644
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.BungeeCord;
@@ -159,7 +161,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -158,7 +160,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
if ( packet.packet == null )
{
@ -353,7 +353,7 @@ index a409d440..3503c089 100644
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.BungeeCord;
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
index 675fa8f1..c8748ce5 100644
index 4820267b..694ecdb0 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
@@ -1,6 +1,8 @@
@ -379,5 +379,5 @@ index a95193ba..a4c3bd71 100644
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.channel.Channel;
--
2.34.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From 8e2ea1839113e4c4c7775e6e8cf82fc51b443f4f Mon Sep 17 00:00:00 2001
From 8dd5f12ca0bc67b8f7ea7257e4a2b1f8c2b4e7f6 Mon Sep 17 00:00:00 2001
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
Date: Fri, 30 Apr 2021 23:51:51 -0300
Subject: [PATCH] FlameCord logger options
@ -40,7 +40,7 @@ index c8148e90..c327841a 100644
} catch (final IOException e) {
e.printStackTrace();
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 89b4122c..999c32f6 100644
index e48f7713..7c0c2fff 100644
--- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java
+++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java
@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
@ -64,10 +64,10 @@ index 89b4122c..999c32f6 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 0957c1f1..7209ac64 100644
index 3bf47365..af128f0b 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
@@ -372,7 +372,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -392,7 +392,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
case 1:
// Ping
@ -77,7 +77,7 @@ index 0957c1f1..7209ac64 100644
{
bungee.getLogger().log( Level.INFO, "{0} has pinged", this );
}
@@ -381,7 +382,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -401,7 +402,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
break;
case 2:
// Login
@ -88,7 +88,7 @@ index 0957c1f1..7209ac64 100644
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
}
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
index c8748ce5..778deb63 100644
index 694ecdb0..14e3004f 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
@@ -46,7 +46,8 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
@ -139,5 +139,5 @@ index c8748ce5..778deb63 100644
{
if ( cause instanceof ReadTimeoutException )
--
2.34.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From d9798110ca3de1602a74372db57a5161cc07c382 Mon Sep 17 00:00:00 2001
From 2e496d47435bb97de442fe1a12020c695169f634 Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Thu, 7 Oct 2021 21:37:24 -0300
Subject: [PATCH] Custom motd system
@ -125,7 +125,7 @@ index c327841a..de2cc947 100644
this.loggerExceptions = setIfUnexistant("logger.exceptions", this.loggerExceptions, configuration);
this.loggerDump = setIfUnexistant("logger.dump", this.loggerDump, configuration);
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 477ca39a..e6b5e5da 100644
index af128f0b..9b2d8842 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
@@ -22,6 +22,8 @@ import javax.crypto.spec.SecretKeySpec;
@ -137,7 +137,7 @@ index 477ca39a..e6b5e5da 100644
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.BungeeCord;
@@ -252,7 +254,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -272,7 +274,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" );
ServerInfo forced = AbstractReconnectHandler.getForcedHost( this );
@ -145,7 +145,7 @@ index 477ca39a..e6b5e5da 100644
final int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
Callback<ServerPing> pingBack = new Callback<ServerPing>()
@@ -315,7 +316,52 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -335,7 +336,52 @@ public class InitialHandler extends PacketHandler implements PendingConnection
( (BungeeServerInfo) forced ).ping( pingBack, handshake.getProtocolVersion() );
} else
{
@ -200,5 +200,5 @@ index 477ca39a..e6b5e5da 100644
thisState = State.PING;
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,14 +1,14 @@
From 1dab3e8e846bfac8bb6c6bc2293e8a9839ba3f0b Mon Sep 17 00:00:00 2001
From e235d2ea3d258d995b5e06cf0f6fd474863510fb Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Fri, 25 Feb 2022 12:28:31 -0300
Subject: [PATCH] InitialHandler Processing 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 e6b5e5da..75956d4a 100644
index 9b2d8842..14461824 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
@@ -132,12 +132,12 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -131,12 +131,12 @@ public class InitialHandler extends PacketHandler implements PendingConnection
private enum State
{
@ -23,7 +23,7 @@ index e6b5e5da..75956d4a 100644
}
@Override
@@ -252,6 +252,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -272,6 +272,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
public void handle(StatusRequest statusRequest) throws Exception
{
Preconditions.checkState( thisState == State.STATUS, "Not expecting STATUS" );
@ -31,7 +31,7 @@ index e6b5e5da..75956d4a 100644
ServerInfo forced = AbstractReconnectHandler.getForcedHost( this );
final int protocol = ( ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) ? handshake.getProtocolVersion() : bungee.getProtocolVersion();
@@ -374,6 +375,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -394,6 +395,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
{
// FlameCord - Never accept invalid packets
Preconditions.checkState( thisState == State.PING, "Not expecting PING" );
@ -39,7 +39,7 @@ index e6b5e5da..75956d4a 100644
unsafe.sendPacket( ping );
@@ -385,6 +387,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -405,6 +407,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
public void handle(Handshake handshake) throws Exception
{
Preconditions.checkState( thisState == State.HANDSHAKE, "Not expecting HANDSHAKE" );
@ -47,7 +47,7 @@ index e6b5e5da..75956d4a 100644
this.handshake = handshake;
ch.setVersion( handshake.getProtocolVersion() );
@@ -457,6 +460,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -477,6 +480,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
public void handle(LoginRequest loginRequest) throws Exception
{
Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" );
@ -55,7 +55,7 @@ index e6b5e5da..75956d4a 100644
if ( !AllowedCharacters.isValidName( loginRequest.getData(), onlineMode ) )
{
@@ -767,14 +771,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -787,14 +791,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public void setOnlineMode(boolean onlineMode)
{
@ -73,5 +73,5 @@ index e6b5e5da..75956d4a 100644
this.uniqueId = uuid;
}
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From fd425f8a23b16f34f1a538cb1f7c64cab08cfb33 Mon Sep 17 00:00:00 2001
From 7ff5f4b942384c2e27a65e84a793121bab6aff93 Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Fri, 4 Mar 2022 13:35:53 -0300
Subject: [PATCH] Antibot System
@ -930,7 +930,7 @@ index 4f306660..33c40733 100644
setIfUnexistant("flamecord_reload", "&aAll files had been successfully reloaded!", configuration);
setIfUnexistant("flamecord_help",
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 caff4e99..ad5fc0ae 100644
index 14461824..bc73abe7 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
@@ -20,6 +20,8 @@ import java.util.logging.Level;
@ -942,7 +942,7 @@ index caff4e99..ad5fc0ae 100644
import dev._2lstudios.flamecord.FlameCord;
import dev._2lstudios.flamecord.configuration.FlameConfig;
@@ -417,6 +419,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -437,6 +439,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection
return;
}
@ -954,7 +954,7 @@ index caff4e99..ad5fc0ae 100644
switch ( handshake.getRequestedProtocol() )
{
case 1:
@@ -428,6 +435,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -448,6 +455,22 @@ public class InitialHandler extends PacketHandler implements PendingConnection
}
thisState = State.STATUS;
ch.setProtocol( Protocol.STATUS );
@ -977,7 +977,7 @@ index caff4e99..ad5fc0ae 100644
break;
case 2:
// Login
@@ -439,6 +462,21 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -459,6 +482,21 @@ public class InitialHandler extends PacketHandler implements PendingConnection
thisState = State.USERNAME;
ch.setProtocol( Protocol.LOGIN );
@ -999,7 +999,7 @@ index caff4e99..ad5fc0ae 100644
if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) )
{
if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() )
@@ -499,6 +537,58 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -519,6 +557,58 @@ public class InitialHandler extends PacketHandler implements PendingConnection
return;
}
@ -1112,17 +1112,27 @@ index fa87750f..67263bca 100644
if ( !bungee.getPluginManager().callEvent( chatEvent ).isCancelled() )
{
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
index 20c4c0a4..c737482e 100644
index 65e79eec..dc2b6a7f 100644
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
@@ -152,6 +152,13 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
@@ -12,6 +12,8 @@ import io.netty.handler.timeout.ReadTimeoutException;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.logging.Level;
+
+import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.connection.CancelSendSignal;
import net.md_5.bungee.connection.InitialHandler;
@@ -152,6 +154,14 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
{
boolean logExceptions = !( handler instanceof PingHandler );
+ // Flamecord start - Antibot System
+ if (!(cause instanceof ReadTimeoutException && cause instanceof IOException))
+ if (!(cause instanceof ReadTimeoutException) && !(cause instanceof IOException))
+ {
+ FlameCord.getInstance().getAddressDataManager().getAddressData(ctx.channel().remoteAddress()).firewall();
+ BungeeCord.getInstance().getLogger().log( Level.INFO, "[FlameCord] [{0}] was firewalled because of " + cause.getClass().getName(), ctx.channel().remoteAddress() );
+ }
+ // Flamecord end - Antibot System
+
@ -1154,5 +1164,5 @@ index ffea1599..6bf109f5 100644
{
ch.close();
--
2.36.1.windows.1
2.37.0.windows.1

View File

@ -1,4 +1,4 @@
From f1ef24bf5679ec5b5f06df202a1f3952a8f2f65e Mon Sep 17 00:00:00 2001
From 87c99406b973f087404a0f3e9af20f2daf94d613 Mon Sep 17 00:00:00 2001
From: LinsaFTW <25271111+linsaftw@users.noreply.github.com>
Date: Fri, 4 Mar 2022 14:09:35 -0300
Subject: [PATCH] Allow Invalid Names
@ -29,10 +29,10 @@ index da3f915f..31631626 100644
this.tcpFastOpen = setIfUnexistant("tcp-fast-open", this.tcpFastOpen, configuration);
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 716949ae..7c539248 100644
index bc73abe7..4c26462c 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
@@ -500,7 +500,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@@ -520,7 +520,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" );
thisState = State.PROCESSING_USERNAME;
@ -42,5 +42,5 @@ index 716949ae..7c539248 100644
disconnect( bungee.getTranslation( "name_invalid" ) );
return;
--
2.36.1.windows.1
2.37.0.windows.1