Skip to content
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

Krypton cannot connect to servers running the LilyPad proxy #22

Closed
solonovamax opened this issue Apr 22, 2021 · 5 comments
Closed

Krypton cannot connect to servers running the LilyPad proxy #22

solonovamax opened this issue Apr 22, 2021 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@solonovamax
Copy link
Contributor

solonovamax commented Apr 22, 2021

I was joining the server (play.mineclub.com) because I heard of it and thought "why not?"

But when joining with krypton, it doesn't allow you to join the server.
No stack trace in the console either.

Might have something to do with how they send a custom resource pack, but I'm not sure. I know so little about this domain that I'm not even going to attempt to diagnose any of this.
Or, it might just be because they're doing cursed packet stuff. Good lord, some of the packets they're sending are cursed. The stuff fills up my console to the brim with errors and warnings.

@astei astei added the bug Something isn't working label Apr 23, 2021
@astei
Copy link
Owner

astei commented Apr 23, 2021

This is actually an incompatibility between Krypton and the LilyPad proxy software. Given that Krypton works perfectly fine with BungeeCord, Waterfall, and Velocity, and the overall diminishing support for LilyPad, this is a bug but it is very low priority for me.

@astei astei changed the title Breaks on play.mineclub.com Krypton cannot connect to servers running the LilyPad proxy Apr 23, 2021
@solonovamax
Copy link
Contributor Author

Yeah, fair point. It was just this particular server that died with it.

Perhaps you could maybe implement some form of "compatibility mode" (which just disables everything)?

@astei
Copy link
Owner

astei commented Apr 24, 2021

That is the wrong approach to take. Krypton is intended to be wire-level compatible. Any deviation from that is considered a bug.

@solonovamax
Copy link
Contributor Author

Fair enough. I just think it'd be an easy way to add ""compatibility""; just allow users to disable it in-game.
But it's understandable if you don't want to do that.

@astei
Copy link
Owner

astei commented May 6, 2021

After some further investigation, I have determined that the issue is triggered by the libdeflate compressor in Krypton. (Interestingly enough, both zlib and libdeflate don't like the stream that caused the issue, for reasons I'll explain in the next paragraph.)

The issue arises specifically from a bug in LilyPad (or klauspost/compress, the compression library they use). Specifically, the stream causing the issue is not marked as having an end. This is fine with zlib, which supports streaming compressed data - it is not OK with libdeflate, which expects a complete stream. This is just another example of the Minecraft protocol being extremely sloppy. Vanilla always sends finished streams to the client, so LilyPad is the guilty party.

Given that this would affect a very limited audience (people running Linux and the minority of servers running LilyPad) I'm not in any big rush to fix this issue. You can work around it by adding -Dvelocity.natives-disabled=true to your Java startup flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants