Repository navigation
feat(anticheat): detect cheat clients and disable unfair mods - #338
Open
TheMeinerLP wants to merge 4 commits into
Open
TheMeinerLP wants to merge 4 commits into
TheMeinerLP wants to merge 4 commits into
Conversation
Read the client's minecraft:brand and minecraft:register messages in both the configuration and play phases and kick clients that announce a known cheat client (brand fragment, blocked channel prefix, or a brand outside an optional whitelist). The mode decides between off, log only and kick.
Lunar Client users get the mods that could give a survivor an edge switched off. Once the client registers lunar:apollo, the server sends one ModSetting override (protobuf, wrapped in Any) that sets the enabled option of each configured mod to false. The mods default to minimap, waypoints, freelook, zoom, coordinates and directionhud, configured with lunar.disabled-mods. This is a client courtesy API, not a cheat-proof measure.
The client guard now asks each player's client, on the first spawn, which shader mods it has. Iris, OptiFine and Canvas kick the client with the incompatible mods message, Sodium, Embeddium and Nvidium are only logged and recorded on the profile. The probe shows translatable texts on a sign that exists for that player only, opens the sign editor on it and reads the answer from the sign update. A key that resolved differs from its fallback. A client that does not answer within shader-probe-timeout-ticks is not judged.
Contributor
Test results 666 files 666 suites 3m 58s ⏱️ Results for commit cee6e6e. |
Joltras
requested changes
Oct 13, 2026
| SERVER_FULL = withMiniPrefix("<red>The server is full! Unable to join!"); | ||
| GAME_ALREADY_STARTED = withMiniPrefix("<red>The game has already started! Unable to join!"); | ||
| CLIENT_BLOCKED = withMiniPrefix("<red>Unsupported client detected! Remove your modifications to join."); | ||
| INCOMPATIBLE_MODS = withMiniPrefix("<red>Du hast inkompatible Mods! Entferne sie, um beizutreten."); |
Collaborator
There was a problem hiding this comment.
Why is this specific message in German instead of English?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Adds an anticheat layer that detects cheat and unfair client mods on join and kicks or disables them.
Client guard
minecraft:registerchannels a client announces.OFF,LOG,KICK(defaultKICK).Client APIs
wdl:controlchannel.AddonDisablePacket(id 24) that disables its addons.apollo-protos0.2.7 with protobuf-java 3.25.5. This is a lightweight path, becauseapollo-minestombundles unrelocated Adventure.Shader-mod probe
Configuration
client-guard.,client-api.andlunar., seeconfig.properties.example.Limitations
directionhud) are NOT tested against a live client.Types of changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyTest plan
:common:test425,:game:test1040, 0 failuresChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any ofthem, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.