Add translation blocking to prevent server-side mod detection#6348
Open
YeaiDoNotKnowAGoodUsername wants to merge 1 commit intoMeteorDevelopment:masterfrom
Open
Conversation
|
You should add a toggle but its on by default. |
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.
Type of change
Description
Servers like Donut SMP check for translation keys on signs to detect mods. So I added a mixin that strips the
translatetag from sign NBT packets when they come from the server. It replaces them with thefallbacktext instead. This way translation keys likekey.meteor-client.open-guidon't get resolved, so servers can't detect which mods you have.It works on all translation keys on signs (front and back), and it's always-on so you don't need to toggle it.
How It Works
The mixin intercepts
BlockEntityUpdateS2CPacketpackets when they're received from the server. It looks at the NBT data in the packet and checks bothfront_textandback_textformessagesarrays. For each message in the array, if it contains atranslatetag, the mixin removes that tag and replaces it with atexttag set to thefallbackvalue. This prevents the client from trying to resolve the translation key, so the server can't detect if the key exists on your client.The fallback text is the plain text version that servers send as a backup in case translation fails. By using this instead of the translation key, the sign still displays readable text but without exposing which mods or resource packs you have installed.
What It Works On
Since it works at the NBT packet level, it blocks translation keys from anything - mods, resource packs, or any other source that uses translate tags on signs.
Related issues
None
How Has This Been Tested?
Built it and went on a server with translation key checks - didn't get detected.
Checklist: