feat(api): publish stable connect-player channel marker - #75
Merged
Conversation
Connect authenticates players at its edge and hands the proxy an already-verified, offline-mode connection. Login/auth plugins that run later and force ONLINE mode on that connection hang the login, because no second Mojang session exists. Publish a stable marker any login plugin can read to detect a Connect-tunneled player and skip its own flow, mirroring Floodgate's 'floodgate-player' convention: - new ConnectAttributes.CONNECT_PLAYER, wire name exactly 'connect-player', valued with the ConnectPlayer so integrators get identity and skin properties while a plain presence check needs no dependency on Connect - set in LocalServerChannelWrapper#newLocalChannel, the earliest point at which both the proxy-facing channel and the Connect player exist, so it is readable before any Velocity/Bungee/Spigot login event fires; only for non-passthrough sessions, since passthrough is not authenticated by Connect and must still go through the server's login flow - ConnectPlayerAttributeBoundaryTest pins both the name and the set-site - docs/login-plugin-integration.md publishes the contract, the ConnectApi UUID lookups, and the permanent-stability commitment Adds a readable marker only; no change to Connect's PreLogin or GameProfile behavior.
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.
Intent
Ship a stable, public "externally authenticated by Connect" marker on the proxy-facing connection so any login/auth plugin (LibreLogin, AuthMe, nLogin, future ones) can detect a Connect-tunneled player and skip its own login flow. This is Part A of a LibreLogin compatibility fix, backed by a scout report.
Background the reviewer will not see in the diff: Connect authenticates players at its edge and hands the proxy an already-verified, offline-mode connection. Login plugins that run later and force ONLINE mode on that connection hang the login, because no second Mojang session exists. LibreLogin already solves exactly this for Floodgate by checking a 'floodgate-player' channel attribute at every conflict point; it just has no equivalent signal for Connect. This task publishes that signal.
Deliberate decisions (do not flag these as mistakes):
Hard scope line, deliberately observed: this change only ADDS a readable marker. It does NOT change Connect's PreLogin or GameProfile injection behavior, and it must not affect login for anyone not reading the attribute. The diff is intentionally limited to the new api attribute class, the one marker set-site, the boundary test, and the integration docs (plus a README link and a short AGENTS.md pointer). It does not depend on any LibreLogin change; the upstream PR is a separate later task.
Verification done: ./gradlew build is green; the boundary test is mutation-checked (renaming the attribute value fails 2 of its 3 tests).
What Changed
connect-playerNetty attribute and documented itsConnectPlayervalue and integration semantics.Risk Assessment
✅ Low: The marker is set on the shared proxy-facing channel path for non-passthrough sessions, with matching public API, tests, and documentation; no source-verifiable material issues were found.
Testing
The focused boundary test passed for exact naming, authenticated marker visibility through the external Netty key, and passthrough absence. No visual artifact applies because this is a Netty connection contract.
Evidence: Connect player boundary test report
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
./gradlew :core:test --tests com.minekube.connect.network.netty.ConnectPlayerAttributeBoundaryTest --rerun-tasksReviewed target diff and focused JUnit report./gradlew cleanand verified transient build outputs were removed✅ **Document** - passed
✅ No issues found.
core/src/main/java/com/minekube/connect/util/ReflectionUtils.java:294- Core Javadoc still fails on unescaped <T> tags at lines 294 and 308; unchanged and outside this change’s scope.core/src/main/java/com/minekube/connect/util/Utils.java:178- Core Javadoc cannot resolve GameProfile.Property; unchanged and outside this change’s scope.✅ **Push** - passed
✅ No issues found.