Northstar icon indicating copy to clipboard operation
Northstar copied to clipboard

Display the ping value of the server

Open logique233 opened this issue 2 years ago • 6 comments

In the server list, it is very useful to display the ping value connected to the server

logique233 avatar Dec 25 '21 09:12 logique233

The problem with this is that either:

  • The master server has to be the one pinging, which will give values which aren't really relevant to you.
  • You ping the other server, but that means that the Northstar server has to expose it's IP before you authenticate (or after, but either way, it'll significantly increase the number of requests and be detrimental to the overall security).
  • The other server pings you, but that has the same issue.

pg9182 avatar Dec 25 '21 09:12 pg9182

I'm working on this on a fork. Hopefully I can make a fully client-side solution but I may have to add some code to the master server to allow for this. Password protected servers have no way of the client pinging them cause they have private IPs.

I'm just trying to wrap my head around how to get the ping value in the UI now cause other than that it works quite well.

barnabwhy avatar Dec 25 '21 09:12 barnabwhy

What about some kind of workaround? If Northstar can read client's ping value(the one that's shown under scoreboard), then the masterserver could calculate an average from pings of every client connected to specific server

kosiarn avatar Dec 25 '21 10:12 kosiarn

That's an interesting idea. I guess it could even be taken a step further to group the ping by country and choose the closest one to the client asking about the ping.

pg9182 avatar Dec 25 '21 10:12 pg9182

I have now figured out the UI stuff and it seems as though I have a functional system to get server ping values for any server which responds to ICMP echos.

Any which don't just say "Ping: NaN"

barnabwhy avatar Dec 25 '21 10:12 barnabwhy

That's an interesting idea. I guess it could even be taken a step further to group the ping by country and choose the closest one to the client asking about the ping.

Likely won't be enough data. Plus, there are other variables such as individual signal strength, etc. that would affect this

MiloAkerman avatar Dec 26 '21 05:12 MiloAkerman