-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Mineflayer doesn't send configuration.settings packet at login, causing some servers to disconnect the user #3623
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
Comments
i have a same problem. i not found a solution. 😭 |
Likely a duplicate of #3607 |
Looking at the debug log, why is the client information packet not sent immediately after The client just never sends I think it is likely that this discrepancy is the root cause. |
I don't see anything on the Minecraft wiki's protocol documentation that seems to indicate whether it's strictly necessary or not, but I think it would make sense to send regardless, as that's what the vanilla client appears to do. |
Try it out indeed we don't send it |
Definitely vanilla doesn't require it |
I tested on Paper, Paper behind Waterfall and Paper behind Velocity, and it was able to connect to all 3, so unfortunately I wasn't able to reproduce it on a server I manage. I'm really not sure what kind of proxy/server setup that Hypixel and Wynncraft are using, but I'm guessing they adhere strictly to vanilla client behavior as somewhat of an anti-bot method. I really should be asleep though, so if you happen to have the time to spare, I'd appreciate if you could try it out seeing as you probably know the codebase well, but if not, I'll try to take a look later today! |
https://github.com/PrismarineJS/node-minecraft-protocol/blob/9e116c3dd4682b17c4e2c80249a2447a093d9284/src/client/play.js#L53 here we can try adding something like client.write('packet_settings,{...the right fields here based on doc above}) |
Although now I notice you're talking about hypixel, I guess they have a number of other captcha that would all need bypassing |
Captcha? Other than that settings packet, I'm pretty certain that Mineflayer is pretty accurate to vanilla behavior. I've been able to connect to Hypixel with Mineflayer for years now, on 1.12.2, 1.16.5, 1.18.2, 1.19.4 and 1.20/1.20.1. I had to keep raising the version obviously as Minecraft/Hypixel upgraded, but as of today, only 1.8 and 1.19+ are supported. From my understanding, some of Hypixel's security comes from some kind of external packet monitoring algorithm. My guess is that all packets flowing through their proxy instances are also routed to some in-house app that uses a neural network to look for any anomalies and non-vanilla behavior. It's quite sophisticated, but shouldn't really be an issue for Mineflayer unless you're trying to be malicious. |
Yes few big servers try and detect non-human activity and kick the detected clients. |
Yes, but as I said, Mineflayer is already quite good. I don't know about other servers, but there's really no extra work necessary to bypass anything on Hypixel in particular. The only instance I have heard of is people who try to connect to Hypixel on Bedrock through Geyser. The packet timings I believe get them immediately kicked when they move. Mineflayer doesn't have this issue though, but regardless, if you try something malicious, you'll get caught through other detection systems. |
Yup, this is the issue. I can join Hypixel in 1.20.4 and 1.21.4 with that packet. if (client.state === states.PLAY) {
client.write('configuration_acknowledged', {})
}
client.state = states.CONFIGURATION
client.write('settings', {locale: "en_us", viewDistance: 10, chatFlags: 0, chatColors: true, skinParts: 127, mainHand: 1, enableTextFiltering: false, enableServerListing: true})
client.on('select_known_packs', () => {
client.write('select_known_packs', { packs: [] })
}) |
The Wynncraft issue @Sebastien-Moraz mentioned is not the same as this. Wynncraft sends a transfer packet shortly after login for load balancing purposes, but it seems Mineflayer doesn't yet handle those? From what I've heard, Hypixel will implement a similar load balancer sometime soon, so it will eventually affect Hypixel too. |
Is there a way around this problem? |
Uh oh!
There was an error while loading. Please reload this page.
Versions
Detailed description of a problem
Mineflayer cannot join Hypixel on any version greater than 1.20.1 (versions 1.20.2-1.21.4). It disconnects with "socketClosed" after timing out.
What did you try yet?
Did you try any method from the API?
Did you try any example? Any error from those?
Your current code
Minimal repo: https://github.com/PseudoResonance/MineflayerBug/blob/main/src/bot.ts
Expected behavior
Mineflayer should join just like a vanilla 1.20.2-1.21.4 client.
Additional context
Debug Log
I also saw #3435, but it seemed slightly different.
The text was updated successfully, but these errors were encountered: