gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
606 stars 146 forks source link

Dayz server --requestRules empty #263

Closed podrivo closed 2 years ago

podrivo commented 2 years ago

Hello @mmorrisontx!

Not sure exactly what is going on, but some servers there are no "rules": {} set in gamedig response, even though requestRules is set.

For example these two servers:

gamedig --type dayz 194.26.183.44:27016 --requestRules
gamedig --type dayz 172.111.51.5:27017 --requestRules

You can check that the rules info is being passed from the server, by checking these other implementations:

I believe it has something to do with this line: https://github.com/gamedig/node-gamedig/blob/5c2d15df495bb0467d31e2d2782584295297b8a3/protocols/valve.js#L205

Which I believe is also affecting these other lines: https://github.com/gamedig/node-gamedig/blob/5c2d15df495bb0467d31e2d2782584295297b8a3/protocols/valve.js#L264-L289

Is this a bug or a server limitation? Best.

mmorrisontx commented 2 years ago

If I run bin/gamedig.js --type dayz 172.111.51.5 --debug --requestRules, the rules do show up as expected. The dayzMods seem to be corrupted, but I think that's an unrelated issue.

mmorrisontx commented 2 years ago

It's worth noting that these dayz servers are not following the valve protocol packet splitting spec. The rules info returned by 172.111.51.5 is sent in a single 2500 byte packet, which means it may be dropped by ISPs and server providers that don't support packet fragmenting. I don't know many details about that, but I do know that UDP packets this large will often have deliverability problems.

mmorrisontx commented 2 years ago

Don't think there's anything actionable in this ticket unfortunately. Seems like these servers are responding the rules packets, but they're jumbo. If you aren't receiving them, you'll need to try from another internet connection :(