lance-gg / lance

Multiplayer game server based on Node.JS
https://lance-gg.github.io/
Apache License 2.0
1.58k stars 168 forks source link

Hardcoded Host in NetworkMonitor #120

Closed ambrons closed 5 years ago

ambrons commented 5 years ago

I'm assuming this was an oops, but you have a hardcoded hostname for pinging latency in the NetworkMonitor class when a player registers.

https://github.com/lance-gg/lance/blob/master/src/network/NetworkMonitor.js#L64

namel commented 5 years ago

Hi @ambrons this was intentional. The effect of this code, is that if the game supplies the option countConnections on the server options, then the game will send a message to a lance server which counts how many players have connected wordwide.

See the constructor documentation for ServerEngine at http://docs.lance.gg/ServerEngine.html

T-vK commented 5 years ago

Okay and why exactly would I want this to happen on http://ping.games-eu.lance.gg:2000 rather than on my own node server?

namel commented 5 years ago

it's a simple ping to our lance server, to let us know if players are connecting to the Lance sample games.

T-vK commented 5 years ago

Still, I agree with ambrons that the address shouldn't be hardcoded. Since the pinging code is directly in the library rather then in the example, it should be configurable. I also wonder what the GDPR says about collecting this kind of data without user conscent.