Skip to content

Comments

Option to allow geyser clients with a file patcher.#85

Open
Abdo9616 wants to merge 3 commits intoDiffuseHyperion:masterfrom
Abdo9616:GeyserAllow
Open

Option to allow geyser clients with a file patcher.#85
Abdo9616 wants to merge 3 commits intoDiffuseHyperion:masterfrom
Abdo9616:GeyserAllow

Conversation

@Abdo9616
Copy link

@Abdo9616 Abdo9616 commented Feb 5, 2026

Added

  • Geyser Client Support: Added allow_geyser_clients configuration option to allow Bedrock Edition players to join servers
    • New config section: [geyser]
    • New setting: allow_geyser_clients = false (defaults to disabled for security)
    • Clients without the InertiaAntiCheat mod (including Geyser/Bedrock clients) can now be allowed or blocked based on server configuration
  • Auto-Config Patching: Implemented automatic TOML configuration patching on server startup
    • Automatically detects missing configuration sections and settings
    • Safely adds new defaults without overwriting existing user configurations
    • Backs up existing config before patching

Changed

  • Improved server login handling to detect and handle non-mod clients
  • Enhanced ServerLoginModlistTransferHandler.checkConnection() to respect Geyser client settings

Technical Details

  • Added ConfigPatcher utility class for automatic configuration management
  • Modified InertiaAntiCheatServer initialization to run config patches on startup

@Abdo9616 Abdo9616 closed this Feb 5, 2026
@Abdo9616 Abdo9616 deleted the GeyserAllow branch February 5, 2026 14:37
@Abdo9616 Abdo9616 restored the GeyserAllow branch February 5, 2026 20:55
@Abdo9616 Abdo9616 reopened this Feb 5, 2026
@Abdo9616
Copy link
Author

Abdo9616 commented Feb 5, 2026

Added

  • Deferred Geyser/Floodgate validation to the play-join stage for clients that cannot respond to the anti-cheat handshake.
  • Connection-based pending tracker to avoid relying on login-stage profiles.
  • Floodgate reflection bridge with lazy initialization.
  • Server common network handler mixin to expose the underlying connection.

Changed

  • Floodgate validation now uses UUID-only checks to avoid name-based race conditions.

Fixed

  • Bedrock clients being kicked during login when geyser.allow_geyser_clients = true.

@DiffuseHyperion DiffuseHyperion self-requested a review February 12, 2026 01:06

[geyser]
# Whether to allow Geyser clients (Bedrock players) to join the server. (Floodgate is required)
allow_geyser_clients = false (Warning: Extra security risk, use at your own risk)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is invalid syntax

/.idea/
/runClient/
/runServer/
Command.bat
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i assume you forgot to remove this before commiting


boolean allowGeyserClients = InertiaAntiCheatServer.serverConfig.getBoolean("geyser.allow_geyser_clients", false);
UpgradedServerLoginNetworkHandler upgradedHandler = (UpgradedServerLoginNetworkHandler) handler;
net.minecraft.network.ClientConnection connection = upgradedHandler.inertiaAntiCheat$getConnection();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please import the classes instead

Copy link
Owner

@DiffuseHyperion DiffuseHyperion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theres a bunch of illogical code and code that doesnt follow the standards of the rest of the project

i appreciate your effort in submitting this, but this is not ready to be merged into the project

@@ -0,0 +1,104 @@
package com.diffusehyperion.inertiaanticheat.server;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the point of this? can't the floodgate api be imported as a gradle dependency?

Toml config = new Toml().read(configFile);
if (!Objects.equals(config.getLong("debug.version", 0L), currentConfigVersion)) {
warn("Looks like your config file is outdated! Backing up current config, then creating an updated config.");
boolean versionMismatch = !Objects.equals(config.getLong("debug.version", 0L), currentConfigVersion);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feature isn't part of the main feature proposed in the pr (afaik), please open another pr instead

currently, i'm unwilling to add a config file patcher to avoid the possibility of the config file getting messed up without the user's knowledge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants