Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
404 stars 137 forks source link

Add Raknet protocol class with Minecraft Bedrock Edition protocol. #657

Closed Austinb closed 1 year ago

Austinb commented 2 years ago

Only real game used with this. Normalize still needs tweaking.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.2%) to 88.373% when pulling e9bd2e7c5baa2538856013177f4d5ab58c3c149f on features/MInecraftBE_Raknet into 44e7906661ae90c68d77005f42cbbf151caea478 on v3.

Austinb commented 2 years ago

This is for #642. Needs checking of the normalize response. Might need to add a bit more testing around the whole magic query business which is just a bit odd.

Austinb commented 2 years ago

Sorry for the force push, had the wrong information for my signature. Will be fixed moving forward.

Erani0 commented 2 years ago

This is for #642. Needs checking of the normalize response. Might need to add a bit more testing around the whole magic query business which is just a bit odd.

I'll test it in detail later and if there's an error I'll write something about it

Austinb commented 2 years ago

This is for #642. Needs checking of the normalize response. Might need to add a bit more testing around the whole magic query business which is just a bit odd.

I'll test it in detail later and if there's an error I'll write something about it

Sounds good. Will finish up the testing as well once there are other tweaks that need to be made. Also, the server tests may need to be rebuilt.

Erani0 commented 2 years ago

So I tested it with a couple of public servers and it seems that there are servers that do not transmit the port_ipv4 and port_ipv6 port then it comes to the following error message Warning: Undefined array key 10 in /var/www/pterodactyl/public/test/GameQ/Protocols/Raknet.php on line 156

Warning: Undefined array key 11 in /var/www/pterodactyl/public/test/GameQ/Protocols/Raknet.php on line 157

And on none of the tested servers the player list can be displayed. Maybe this can be changed.

Austinb commented 2 years ago

So I tested it with a couple of public servers and it seems that there are servers that do not transmit the port_ipv4 and port_ipv6 port then it comes to the following error message Warning: Undefined array key 10 in /var/www/pterodactyl/public/test/GameQ/Protocols/Raknet.php on line 156

Warning: Undefined array key 11 in /var/www/pterodactyl/public/test/GameQ/Protocols/Raknet.php on line 157

Please send the IP addresses and ports for those servers so I can add them as tests. Need to make sure this class does not emit any kind of warnings/notices.

And on none of the tested servers the player list can be displayed. Maybe this can be changed.

Please check the Raknet protocol documents - the link is in the header of the Raknet.php file. There is no information on gathering player information other than current and maximum player counts.

Erani0 commented 2 years ago

this is a public Bedrock server with 15K+ Player 151.80.79.246:19132

to test I have the following now in it so that no error is displayed

        $result->add('port_ipv4', isset($info[10]) ? (int)$info[10] : 0);
        $result->add('port_ipv6', isset($info[11]) ? (int)$info[11] : 0);
scrutinizer-notifier commented 2 years ago

The inspection completed: 4 updated code elements