yesdog / Waterdog

Waterdog, a Yesdog fork of Waterfall/BungeeCord that adds Bedrock support.
MIT License
186 stars 37 forks source link

PlayerAuthInputPacket does NOT WORK #163

Closed Blackjack200 closed 3 years ago

Blackjack200 commented 3 years ago

Version of Waterdog

9c87c5 Expected Behavior

i enable PlayerAuthInputPacket (in StartGanePacket and work without waterdog) Actual Behavior

i enable PlayerAuthInputPacket but waterdog rewrite it to MovePlayerPacket. Crashdump, Backtrace or Other Files

Describe the bug

To Reproduce

Screenshots

Server software used:

PM3 Additional context

Alemiz112 commented 3 years ago

Waterdog does not change packets to other types. PlayerAuthInputPacket is even not handled by proxy.

Blackjack200 commented 3 years ago

Waterdog does not change packets to other types. PlayerAuthInputPacket is even not handled by proxy.

mockingbird check the moveplayer when enable authinput,and i join without waterdog it works but join with warwrdog it wrong detected , i make sure im.use the latest waterdog and i disable.entity_data_rewrite.

Blackjack200 commented 3 years ago

. ![Uploading 2020-11-16 22.56.18.jpg…]()

Alemiz112 commented 3 years ago

waterdog it wrong detected

What do you mean by wrongly detected? Are you able to specify if it means that packet is unhanded due to wrong runtimeId?

disable.entity_data_rewrite

Where did you get an information that it should be disabled?

Blackjack200 commented 3 years ago

entity_data_rewrite disable waterdog entity data rewrite is my change with default config if authinput is enable, Player would not send moveplayer,and waterdog seems send moveplayer when enable authinput

Blackjack200 commented 3 years ago

mockingbird detect moveplayer when enable authinput

Blackjack200 commented 3 years ago

i join a lobby server disable authinout.and join a authinput server by "/server" and it send moveplayer but except authinout

Blackjack200 commented 3 years ago

waterdog may need handle startgamepacket and try to convery moveplayer to authinput

ethaniccc commented 3 years ago

What do you mean by wrongly detected? Are you able to specify if it means that packet is unhanded due to wrong runtimeId?

Mockingbird checks if a client is sending MovePlayer consistently instead of PlayerAuthInput. I haven't been able to reproduce this locally, but this has happened on a production server using Waterdog once (EndGames).

ethaniccc commented 3 years ago

I can 100% confirm this is the fault of Waterdog now. While testing on Versai, everyone (on the proxy) got falsed flagged for the check mentioned (which checks if the player is sending MovePlayerPacket instead of PlayerAuthInputPacket) - and I know the cause.

1st server I'm in when joining the proxy uses MovePlayerPacket, as the playerMovementType in the StartGamePacket sent was 0. 2nd server (which has Mockingbird) when sending the StartGamePacket, makes the playerMovementType to 2, so that the client sends PlayerAuthInput, however, the client is probably not responding to that StartGamePacket and continues to send MovePlayerPackets. Screenshot (373)

TobiasGrether commented 3 years ago

I'll take a look at that issue tomorrow, thanks for the update

Alemiz112 commented 3 years ago

Client accepts StartGamePacket only once. Proxy makes sure that only modified StartGamePacket from first downstream is delivered to client. Therefore you can not change movement type once player is initialized in game. If you require to use PlayerAuthInputPacket you must request it in first downstream server.

As I wrote before PlayerAuthInputPacket isn't implemented into Waterdog and it may contain incorrect entityRuntimeId. I can implement runtime id rewrite for this packet. Also there might be way to convert PlayerMovePacket to PlayerAuthInputPacket if you would really need it.

ethaniccc commented 3 years ago

Also there might be way to convert PlayerMovePacket to PlayerAuthInputPacket if you would really need it.

Wouldn't really be needed, as the anti-cheat also depends on the packet being sent every client tick

Client accepts StartGamePacket only once. Proxy makes sure that only modified StartGamePacket from first downstream is delivered to client. Therefore you can not change movement type once player is initialized in game. If you require to use PlayerAuthInputPacket you must request it in first downstream server.

Guess I'll just have to propose a plugin to all servers to add support for PlayerAuthInputPacket, thanks for the info