This is a hard fork of https://github.com/hyperxpro/SourceEngineQueryCacher
And as such breaks compatibility with pre existing tests and configs. Please make sure you take the updated configs from this repository.
High-Performance Source Engine Query Cacher for caching and responding to A2S_INFO, A2S_RULES and A2S_PLAYER packets.
Features:
- Built on top of Netty.
- Uses Direct Buffers to minimize memory copy and garbage creation in JVM.
- Truely Asynchronous.
- Uses native Epoll Transport.
- Hardens the server against DDOS attempts by decoupling A2S responses from the main game loop and CPU core
- Hardens the server against DDOS attempts by quickly dropping malformed packets.
- Hardens the server against attempts of abusing it as a reflection surface in steam amplification attacks.
- Now also with proper challenge code processing for A2S_INFO, A2S_RULES and A2S_PLAYER packet types
- In-Memory Cache for storing A2S_CHALLENGE codes.
- Multi-threaded with configurable thread count for maximum performance
- Highly configurable using Configuration file or Process arguments.
Java 11 and Linux Kernel 3.9+.
- Download and Install Java 11.
- Download Source Engine Query Cacher Binary.
- Execute the following command:
java -jar SourceEngineQueryCacher-1.7.0.jar
- Source Engine Query Cacher will start and display 'Server Started on Socket: IP:PORT'.
- Configure IPTables for routing Query Packets and everything is done.
iptables -t nat -A PREROUTING -p udp --dport 27015 --match string --algo kmp --hex-string '|FFFFFFFF54|' -j REDIRECT --to-ports 9110
iptables -t nat -A PREROUTING -p udp --dport 27015 --match string --algo kmp --hex-string '|FFFFFFFF55|' -j REDIRECT --to-ports 9110
iptables -t nat -A PREROUTING -p udp --dport 27015 --match string --algo kmp --hex-string '|FFFFFFFF56|' -j REDIRECT --to-ports 9110
iptables -t nat -A PREROUTING -p udp --dport 27015 --match string --algo kmp --hex-string '|FFFFFFFF41|' -j REDIRECT --to-ports 9110
Execute the following command to load configuration file: `java -jar SourceEngineQueryCacher-1.7.0.jar -c Config.conf
Threads: Number of Threads
StatsPPS: Enable Packets per Second Stats
StatsbPS: Enable Bits per Second Stats
GameUpdateRate: Game Server Info Update retrieval interval in Milliseconds
GameUpdateTimeout: Game Server Info Update Socket Timeout in Milliseconds
ChallengeCodeTTL: Maximum Validity of Challenge Code in Milliseconds
LocalServerIPAddress: IP Address on which Cacher Server will bind and listen
LocalServerPort: Port on which Cacher Server will bind and listen
GameServerIPAddress: Game Server IP Address
GameServerPort: Game Server Port
ReceiveBufferSize: Server Receive Buffer Size
SendBufferSize: Server Send Buffer Size
Example: Execute the following command to pass Process Arguments: java -jar SourceEngineQueryCacher-1.7.0.jar -bind 192.168.1.100 -port 27015
-b,--bpsStats Enable Bits per Second Stats
-bind <arg> Local Server IP Address on which Cacher Server will bind and listen
-c,--config <arg> Configuration File Path
-challengeCodeTTL <arg> Maximum Validity of Challenge Code in Milliseconds
-gameip <arg> Game Server IP Address
-gameport <arg> Game Server Port
-gameUpdateRate <arg> Game Server Info Update retrieval interval in Milliseconds
-gameUpdateTimeout <arg> Game Server Info Update Socket Timeout in Milliseconds
-h,--help Display Usages
-p,--ppsStats Enable Packets per Second Stats
-port <arg> Local Server Port on which Cacher Server will bind and listen
-r,--receiveBuf <arg> Server Receive Buffer Size
-s,--sendBuf <arg> Server Send Buffer Size
-w,--threads <arg> Number of Threads