Open NyaomiDEV opened 6 months ago
DEBUG lazymc > Got malformed handshake from client, disconnecting
Hmmmm
It was easy!
pub struct Handshake {
#[data_type(with = "var_int")]
pub protocol_version: i32,
#[data_type(max_length = 65535)] // was max_length = 255
pub server_addr: String,
pub server_port: u16,
#[data_type(with = "var_int")]
pub next_state: i32,
}
@timvisee please add this change :pleading_face:
Okay, I feel as though it should be noted that it seems Velocity, BungeeCord and Floodgate like to append stuff into server_addr
for player forwarding and authentication purposes. While it may seem "a lot" to allow for a 65535 bytes long string, we don't even know if tomorrow there will be another player proxy that appends a ton of extra information to this packet. So, while we're left wondering, this seems safe enough to keep around.
(Also I am currently using a self-compiled version of Lazymc, so while it doesn't break I'm happy)
As I mentioned in https://github.com/timvisee/lazymc/issues/1#issuecomment-2032205079 proxy setups work if they have GeyserMC installed, but at one condition: the Floodgate data cannot be forwarded back to the server if it is sleeping.
I don't exactly know if Floodgate sends extra data with the login packet in a way that breaks Lazymc, but probably this is worth supporting.