Pugmatt / BedrockConnect

Join any Minecraft Bedrock Edition server IP on Xbox One, Nintendo Switch, and PS4/PS5
GNU General Public License v3.0
1.37k stars 159 forks source link

New version has increased the number of packets #487

Open sircurse opened 3 months ago

sircurse commented 3 months ago

What happened?

After the latest version 1.20.73, Minecraft may have increased the number of packets resulting in block from the proxy, the following error is returning while trying to connect:

[nioEventLoopGroup-2-1] WARN org.cloudburstmc.netty.handler.codec.raknet.server.RakServerRateLimiter - [{}] Blocked because packet limit was reached

Is there any way to change the packet limit? increasing it?

Expected Behaviour?

It should connect to the proxy as before.

Steps to reproduce.

Connect first time after starting the game, it should connect without problems, if you shutdown the game and start a new connection the problem will shows up.

Screenshots/Videos

No response

Minecraft Bedrock Version

1.20.73

Console

PS5

Additional Context

No response

Pugmatt commented 3 months ago

The packet rate limits (which were added in the last release, in conjunction with the Protocol library that BedrockConnect uses) can be adjusted with these new startup arguments from the README:

Argument Description Default Value
packet_limit Number of datagram packets each address can send within one tick (10ms) 200
offline_packet_limit Number of "unconnected" datagram packets each address can send within one second. 35
global_packet_limit Number of all datagrams that will be handled within one tick (10ms) before server starts dropping any incoming data. 100000

Since RakServerRateLimiter appears to be throwing the error, you'd probably want to increase packet_limit.

I haven't been seeing blocks on the main instance, which receives pretty heavy volume and is using the default values for the packet limits, so I'm unsure currently why your setup would get blocked with the current limits. But try increasing packet_limit and see what happens.