mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-05-24 23:04:33 +00:00
4e323c83651b9aa56deb00a56be576839584b45f
6 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ba3ebe666c |
feat: dedicated server security hardening
Comprehensive security system to protect against packet-sniffing attacks, XUID harvesting, privilege escalation, bot flooding, and XUID impersonation. - Stream cipher: per-session XOR cipher with 4-message handshake via CustomPayloadPacket (MC|CKey, MC|CAck, MC|COn). Negotiated per-connection, backwards compatible (old clients/servers fall back to plaintext). - Security gate: buffers all game data until cipher handshake completes, preventing unsecured clients from receiving any XUIDs or game state. - Cipher handshake enforcer: kicks clients that don't complete the handshake within 5 seconds (configurable via require-secure-client). - Identity tokens: persistent per-XUID tokens in identity-tokens.json, issued over the encrypted channel, verified on reconnect. Prevents XUID replay attacks. Client stores server-specific tokens. - PROXY protocol v1: parses real client IPs from playit.gg tunnel headers so rate limiting, IP bans, and XUID spoof detection work per-player. - Rate limiting: per-IP sliding window (default 5 connections/30s) with pending connection cap (default 10). - Privilege hardening: OP requires ops.json, live checks on every command and privilege packet. Host-only server settings changes. - XUID stripping: PreLoginPacket response sends INVALID_XUID placeholders. - Packet validation: readUtf global string cap, reduced max packet size, stream desync protection on oversized strings. - OpManager: persistent ops.json with XUID-based OP list. - Whitelist improvements: whitelist add accepts player names with ambiguity detection, XUID cache from login attempts. - revoketoken command: revoke identity tokens for players who lost theirs. - server.log: persistent log file written alongside console output with flush-per-write to survive crashes. - CLI security logging: consolidated per-join security summary with cipher status, token status, XUID, and real IP. Security warnings for kicks, spoofing, and unauthorized commands. |
||
|
|
08f14e32ae |
Add seed validation for server world creation and override-seed property
The dedicated server previously picked a completely random seed with no biome diversity checks (the client validates but the server skipped it). On top of that, the client's findSeed() was hardcoded to only check a 54-chunk (Classic) area, so Large worlds had no diversity guarantee beyond the center. New server worlds now use findSeed() scaled to the full target world size. Added override-seed in server.properties to fix existing worlds without deleting them. |
||
|
|
9af36133cc |
Change default for hardcore-ban-ip to false
Updated the default value of the "hardcore-ban-ip" server property from "true" to "false" in the `kServerPropertyDefaults` array. Adjusted the `LoadServerPropertiesConfig` function to read the "hardcore-ban-ip" property as "false" to ensure consistency with the new default. |
||
|
|
4a3128d32b |
Add hardcore-ban-ip property for IP banning on hardcore death
This commit introduces a new server property `hardcore-ban-ip` that controls whether players who die in hardcore mode are banned by their IP address. This setting should be set to `false` for playit.gg users! Key changes include: - Updated `banPlayerForHardcoreDeath` in `PlayerList.cpp` to check the `hardcoreBanIp` setting and handle IP bans accordingly. - Added `hardcore-ban-ip` to the default server properties in `ServerProperties.cpp`. - Declared the `hardcoreBanIp` boolean variable in `ServerProperties.h` to store the property value. These changes enhance the server's ability to enforce IP bans based on configuration settings. |
||
|
|
8a6934c83c |
Implement persistent hardcore death bans (XUID + IP) for dedicated server
On the dedicated server, hardcore death now persists XUID and IP bans to banned-players.json and banned-ips.json via the Access system, and disconnects the player. Bans survive server restarts. Client-hosted games retain the existing in-memory XUID ban with force-save behavior. - Add hardcore property to server.properties (forces Hard difficulty) - Add LevelData::setHardcore() so loaded worlds respect the server config - Add PlayerList::banPlayerForHardcoreDeath() with persistent XUID + IP bans - Reject respawn requests server-side in hardcore mode - Ensure server-side player ticks run without move packets (fixes environmental damage not applying for some clients) - Restore 0x8 hardcore bit on LoginPacket/RespawnPacket wire format so the client-side death screen detects hardcore mode correctly |
||
|
|
9079db0315 |
Dedicated Server Software - Minecraft.Server.exe (#498)
* add: Dedicated Server implementation - Introduced `ServerMain.cpp` for the dedicated server logic, handling command-line arguments, server initialization, and network management. - Created `postbuild_server.ps1` script for post-build tasks, including copying necessary resources and DLLs for the dedicated server. - Added `CopyServerAssets.cmake` to manage the copying of server assets during the build process, ensuring required files are available for the dedicated server. - Defined project filters in `Minecraft.Server.vcxproj.filters` for better organization of server-related files. * add: refactor world loader & add server properties - Introduced ServerLogger for logging startup steps and world I/O operations. - Implemented ServerProperties for loading and saving server configuration from `server.properties`. - Added WorldManager to handle world loading and creation based on server properties. - Updated ServerMain to integrate server properties loading and world management. - Enhanced project files to include new source and header files for the server components. * update: implement enhanced logging functionality with configurable log levels * update: update keyboard and mouse input initialization |