Addition of FailedDecryptionLogged configuration.

This commit is contained in:
MobiusDevelopment 2023-03-16 01:23:28 +02:00
parent aa0f378c60
commit eb883e13bb
216 changed files with 1208 additions and 62 deletions

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -776,6 +776,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1370,6 +1371,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -463,6 +463,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -787,6 +787,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1382,6 +1383,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -471,6 +471,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -788,6 +788,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1395,6 +1396,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -471,6 +471,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -775,6 +775,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1382,6 +1383,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -471,6 +471,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -774,6 +774,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1381,6 +1382,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -475,6 +475,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -774,6 +774,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1388,6 +1389,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -475,6 +475,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -775,6 +775,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1409,6 +1410,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -477,6 +477,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -781,6 +781,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1417,6 +1418,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -483,6 +483,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -772,6 +772,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1408,6 +1409,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -487,6 +487,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -772,6 +772,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1410,6 +1411,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -491,6 +491,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -772,6 +772,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1411,6 +1412,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -495,6 +495,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -776,6 +776,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1435,6 +1436,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -499,6 +499,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -70,6 +70,10 @@ TcpNoDelay = True
# Default 800
ConnectionTimeout = 800
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -1046,6 +1046,7 @@ public class Config
public static boolean PACKET_FLOOD_LOGGED;
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean FAILED_DECRYPTION_LOGGED;
public static int REQUEST_ID;
public static boolean ACCEPT_ALTERNATE_ID;
public static File DATAPACK_ROOT;
@ -1129,6 +1130,7 @@ public class Config
PACKET_FLOOD_LOGGED = serverConfig.getBoolean("PacketFloodLogged", true);
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");
DATABASE_URL = serverConfig.getString("URL", "jdbc:mariadb://localhost/");
DATABASE_LOGIN = serverConfig.getString("Login", "root");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = false;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -465,6 +465,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -1094,6 +1094,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static int REQUEST_ID;
public static boolean ACCEPT_ALTERNATE_ID;
public static File DATAPACK_ROOT;
@ -1171,6 +1172,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");
DATABASE_URL = serverConfig.getString("URL", "jdbc:mariadb://localhost/");
DATABASE_LOGIN = serverConfig.getString("Login", "root");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

View File

@ -182,6 +182,14 @@ public class NetClient
return _channel;
}
/**
* @return the network configurations of this client.
*/
public NetConfig getNetConfig()
{
return _netConfig;
}
/**
* @return the IP address of this client.
*/

View File

@ -13,6 +13,7 @@ public class NetConfig
private boolean _packetFloodDisconnect = false;
private boolean _packetFloodDrop = false;
private boolean _packetFloodLogged = true;
private boolean _failedDecryptionLogged = true;
private boolean _tcpNoDelay = true;
/**
@ -134,6 +135,23 @@ public class NetConfig
_packetFloodLogged = packetFloodLogged;
}
/**
* @return if failed decryption is logged.
*/
public boolean isFailedDecryptionLogged()
{
return _failedDecryptionLogged;
}
/**
* Sets if failed decryption is logged.
* @param failedDecryptionLogged
*/
public void setFailedDecryptionLogged(boolean failedDecryptionLogged)
{
_failedDecryptionLogged = failedDecryptionLogged;
}
/**
* @return if TCP_NODELAY (Nagle's Algorithm) is used.
*/

View File

@ -479,6 +479,7 @@ public class GameServer
server.getNetConfig().setPacketFloodLogged(Config.PACKET_FLOOD_LOGGED);
server.getNetConfig().setTcpNoDelay(Config.TCP_NO_DELAY);
server.getNetConfig().setConnectionTimeout(Config.CONNECTION_TIMEOUT);
server.getNetConfig().setFailedDecryptionLogged(Config.FAILED_DECRYPTION_LOGGED);
server.start();
LoginServerThread.getInstance().start();

View File

@ -139,6 +139,7 @@ public class LoginServer
server.getNetConfig().setExecutePoolSize(2000);
server.getNetConfig().setPacketQueueLimit(10);
server.getNetConfig().setPacketFloodDisconnect(true);
server.getNetConfig().setFailedDecryptionLogged(false);
server.start();
}

View File

@ -74,6 +74,10 @@ ConnectionTimeout = 800
# Retail: True
PacketEncryption = False
# Log message when packet decryption has failed.
# Default: True
FailedDecryptionLogged = True
# ---------------------------------------------------------------------------
# Database

View File

@ -869,6 +869,7 @@ public class Config
public static boolean TCP_NO_DELAY;
public static int CONNECTION_TIMEOUT;
public static boolean PACKET_ENCRYPTION;
public static boolean FAILED_DECRYPTION_LOGGED;
public static String DATABASE_DRIVER;
public static String DATABASE_URL;
public static String DATABASE_LOGIN;
@ -1338,6 +1339,7 @@ public class Config
TCP_NO_DELAY = serverConfig.getBoolean("TcpNoDelay", true);
CONNECTION_TIMEOUT = serverConfig.getInt("ConnectionTimeout", 800);
PACKET_ENCRYPTION = serverConfig.getBoolean("PacketEncryption", false);
FAILED_DECRYPTION_LOGGED = serverConfig.getBoolean("FailedDecryptionLogged", true);
REQUEST_ID = serverConfig.getInt("RequestServerID", 0);
ACCEPT_ALTERNATE_ID = serverConfig.getBoolean("AcceptAlternateID", true);
DATABASE_DRIVER = serverConfig.getString("Driver", "org.mariadb.jdbc.Driver");

View File

@ -58,8 +58,11 @@ public class ExecuteThread<E extends NetClient> implements Runnable
}
catch (Exception e)
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
if (client.getNetConfig().isFailedDecryptionLogged())
{
LOGGER.warning("ExecuteThread: Problem with " + client + " data decryption.");
LOGGER.warning(CommonUtil.getStackTrace(e));
}
client.disconnect();
continue ITERATE;
}

Some files were not shown because too many files have changed in this diff Show More