AntiXray - A powerful solution against xray users


#1

This is a discussion topic for the Ore project, AntiXray. View the full project on Ore for downloads and more information.


AntiXray

Presentation

AntiXray allows you to protect your server against xray users. This plugin was originally created by Thomas15v but due to lack of time I’ve forked the project and I have finally entirely rewritten the plugin. Thanks to Thomas15v, without him this plugin would not exist. AntiXray modifies the packets before they are sent to the players to prevent malicious users from viewing hidden ores in your world. This plugin aims to be highly configurable, efficient and fast by using the power of Mixin, it integrates with Aikar’s timings system to allow you to monitor its performances.

The jar file must be at the root of the mods/ folder, not in mods/plugins/ or any other folder!

Currently available for:

  • SpongeForge and SpongeVanilla (API 7.1.0, Minecraft 1.12.2)

alt text

Configuration

AntiXray will generate an optimized configuration for each world. These configurations might be modified to disable the plugin in a specific world, to modify the set of ores that will be hidden or even to modify the modifier itself. Configuration files can be found in the config/antixray/worlds/ folder and are well documented to help you find your way but for more information, open this page: Configuration.

Modifiers

In this plugin, a modifier is an algorithm used to modify data sent to players. AntiXray provides an API to create and register your own modifiers but by default 5 modifiers are included in this plugin. For more information about how to use and configure these modifiers, open this page: Modifiers.

Statistics

AntiXray uses bStats to collect anonymous statistics, this can be disabled by editing the following file: config/bStats/config.conf. Here is a list of all currently tracked informations:

  • The count of servers using my plugin
  • The count of players on these servers
  • Online mode
  • Minecraft version
  • Plugin version
  • Core count
  • System arch
  • Operating system
  • Server country
  • Java version

Todo list

  • Add distance based obfuscation
  • Add new modifiers
  • Backport to previous versions
  • Add support for LanternServer

#2

Does not work on SpongeForge latest build.


#3

Can you provide me your SpongeForge version and your logs (fml-junk-earlystartup.log) using a service such as pastebin ?


#4

A new version has been released for AntiXray, it is available for download here.


  • Improved timings
  • Added javadocs to the API
  • Added an intelligent async caching system
  • Preobfuscation is now configurable and disabled by default
  • ChunkModifier now implements CatalogType
  • Few other optimizations

#5

So I updated my server today, decided to add this plugin as we suspected someone of using x-ray. I added it with an entire update, not expecting any issue from it, however I kept getting this error - https://pastebin.com/dvJ6LnvG - I found by process of elimination that it was your plugin. Almost had a nervous breakdown over this, haha. It also affected my /save-all and Aroma Backups.


#6

Sorry for this issue, it will be fixed tonight, I will also try to improve logging in future.


#7

A new version has been released for AntiXray, it is available for download here.


  • Minor improvement for modifiers performances
  • Potentially fixed an issue with chunk caching
  • Added try-catch blocks to prevent propagation of errors in mc internals
  • Improved logging

#8

Hello! I have spam error:


SpongeForge 2834


#9

Can you send me your logs (fml-junk-earlystartup.log and fml-server-latest.log) ?


#10

I have the same issue. Here my logs:


#11

I am also getting the same error:

[Server thread/ERROR] [Sponge]: The Scheduler tried to run the task antixray-S-13 owned by Plugin{id=antixray, name=AntiXray, version=1.1.1, description=A simple but powerful Anti-Xray, authors=[Yeregorix], source=/ssd/JohtoMain/./plugins/AntiXray-1.1.1.jar}, but an error occured.
java.lang.ClassCastException: net.minecraft.world.chunk.Chunk cannot be cast to net.smoofyuniverse.antixray.impl.internal.InternalChunk


#12

I’ve found with the help of other people what the problem was. The jar file must be at the root of the mods/ folder, not in mods/plugins/ or any other folder.


#13

A new version has been released for AntiXray, it is available for download here.


  • Refactored configuration files
  • Modifiers are now even more configurable
  • Modifiers can now be combined
  • Added a new modifier: Bedrock modifier
  • Optimized few things
  • Added a warning when mixin configs were not applied

This update will regenerates all your configuration files.
The new configuration files can be found in the config/antixray/worlds/ folder. The old ones will still be present in config/antixray/ and can be safely deleted.


#14

Sorry I wasn’t able to reply to your message. I tested the new version and it works well. A few questions:

Can you add support for chests? I added “minecraft:chest” in the block list, but the plugin didn’t like it: "[AntiXray]: Failed to load world DIM7’s configuration
ninja.leaping.configurate.objectmapping.ObjectMappingException: Input ‘minecraft:chest’ was not a valid value for type org.spongepowered.api.block.BlockState
at "

Is the radius in chunks? Or what does the 1-4 range signify?

What is the pre-obfuscation do? Is there any performance impact with turning it on?


#15

New stack trace:

fml-server-latest.log:

fml-junk-earlystartup.log:

Its not a consistent spam like the last one, maybe every 5 seconds or so its a new stack trace in the console.


#16

A new version has been released for AntiXray, it is available for download here.


  • Fix error spamming when the configuration was not loaded correctly

#17

I’ve fixed your issue causing spams in your logs.
Chests are already supported like every blocks but currently the config files only support block states, minecraft:chest is not a block state, it’s a block type. For now the correct usage would be to add these block states to the config : minecraft:chest[facing=north], minecraft:chest[facing=south], minecraft:chest[facing=east] and minecraft:chest[facing=west]. For now it’s a bit repetitive but don’t worry I will make it easier soon.
Preobfuscation is similar to the ‘HideAll’ modifier, it’s a temporary modifier applied when others modifiers are not ready yet to protect a chunk. It’s not really important against most xray clients that’s why it’s disabled by default but it can be very important if you want a kind of high protection.
The radius of deobfuscation is in blocks it corresponds the blocks to reveal when for example a player breaks block.
I will update this topic to make a more detailed description as soon as I can.


#18

Awesome, I’m no longer getting spammed in my console. I’ve configured the block list to block vanilla ores, thermal engineering ores, and immersive engineering ores, yet I am still able to see them when they are not exposed to air blocks. Have I configured something incorrectly?

My config: https://gist.github.com/iamtpage/4368cd110b854de0ddbac0e04cdbc9cb


#19

Regarding the issue of the plugin being required to be placed inside the mods directory, it’s weird, because you have set "ForceLoadAsMod": true, which should load it as a mod regardless…

I’ll investigate.

EDIT:
Well, mixin plugins need to be in the mods dir or the mods/<version> dir. FML.


#20

For now, AntiXray is more useful to hide naturally generated blocks because obfuscation is applied only one time per chunk and is not updated when new blocks are placed. As a temporary solution you can disable the cache, it will force obfuscation to be updated on each server restart but take care, disabling caching may decrease performances.
I will try to improve this as soon as I get time.