-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixin implementation #869
Comments
Really good idea, because it would also improve the compatibility with other projects as it hooks directly in the Spigot code. So we could also fire normal join events. However I don't know how good we could integrate a Mixin solution to the supported platforms: Spigot, Bungee and Velocity. Fabric includes the Mixin support from the start (and also Sponge has support for it). These do integrate a custom loader, but our supported platforms do not. |
Can we use ProtocolLib to do with protocol or packet? This (allow non-premium users with |
Setting the server in onlinemode means that all client requests will be answered with authentication requests. Reverting back to offline mode is difficult, because we would need to cancel these outgoing requests and also answer them correctly to the server with fake data. Especially the last part is difficult, because the server would verify the data. Therefore requires to disabling/intercepting the Mojang check and furthermore disable the network encryption. Although difficult, it could be possible. This then fires the normal vanilla events, but there also the topic about hybrid onlinemode servers. What led to requiring offlinemode is that there are plugins and server features that check for the onlinemode. If enabled, they perform a Mojang API lookup. This is not valid for the offline players, playing on it. Offline mode seems to be better choice in our opinion. Nevertheless, I'm interested in what you think. |
So what might work is an simulating |
Could we modify PlayerLoginEvent and re-implement the Premium auth which is just some sort of HTTPs request, and cancel the original event to prevent offline players from being kicked? |
Spigot fires no event before sending the Then we also have the mixed onlinemode issue explained above. |
ProtocolLib seemed to support handling login start packets. And I didn't see EasyAuth do with encryptions explicitly so maybe we don't need to as well. Their technical details are at here. I couldn't understand why we need to make a "fake endpoint". My meaning was to talk to real auth server to confirm premium users and have them logged in through the normal procedure while skip online auth for offline players and log them in directly (by canceling some packets and sending
As long as we can handle player profile stuff correctly at Bukkit side, nothing should go wrong, for plugins seldom communicate with Mojang servers directly (I guess). |
BTW to prevent any conflicts I always meant cancelling server-side (server -> client) packets to this point.
Yes they do, but we need to handle the logic behind it. This means cancelling the packets and somehow answer it with a valid reply. It's similar to the current behavior, but The big issue is how can we bypass the verification in the server implementation if it expects onlinemode without support of Mixins? Once that's solved, we also need a way to revert the changes made for onlinemode like the fact that in onlinemode all following packets are encrypted (not the case in offlinemode). The current behavior is:
All these steps involve our own implementation or existing separate methods. So we only need to call methods (
Yes, because they could use Mixins. Therefore we could access internal data and intercept the incoming method call. How can we do that without Mixin?
Yes, but how would skip it without Mixins? Cancelling the packets won't work, because the server still expects a valid answer to its request.
How do you expect we do that? Intercepting the API requests, because the server has implementations like these: https://github.com/PaperMC/Paper/blob/7044a9c538edb16239a0579722968d395842cdbe/patches/server/0102-Add-setting-for-proxy-online-mode-status.patch#L52 We would need to change/replace them too. |
I'm sorry that my knowledge of plugin development is very shallow, so it's difficult to discuss more in-depth about specific implementations and compatibility. Thank you for taking the time to discuss this with me, and I look forward to this feature being implemented or partially supported in the future. |
Maybe this could be used: https://github.com/vectrix-space/ignite |
Can we implement the function like how the fabric mod EasyAuth does?
That is, keep server in online-mode, and do some mixin injection to allow offline players to join.
The text was updated successfully, but these errors were encountered: