Closed RaphiMC closed 4 months ago
FWIW, the vanilla RakNet client decodes OpenConnectionReply1 differently depending on whether it was compiled with security support or not. If the server enables security but the client doesn't support it, the client won't read the key bytes from the packet, and will interpret those bytes as the MTU size. Basically the server needs to be psychic and know whether the client supports encryption in order to structure the packet properly. RakNet Quality Code ™
Trying to connect to a server which uses the RakNet security flag (In OpenConnectionReply1) causes a timeout. While I am not 100% sure that the timeout is not caused by some other error in go-raknet other RakNet libraries failed because of the servers usage of the security flag (See https://github.com/CloudburstMC/Network/issues/37). Connecting to the server with Bedrock Edition (or https://github.com/extremeheat/fb-raknet) works fine since both use the original RakNet.
Reproduceable example code: