Open Griffon26 opened 4 years ago
Looking into this now. In /common/datatypes.py there are hardcoded IPs for HiRez echo servers:
class m068b(arrayofenumblockarrays):
def __init__(self):
super().__init__(0x068b)
region_server_ping_port = 9002
# Reuse Hirez' UDP echo servers that are set up in each region
self.arrays = [
[
m0448().set(REGION_NORTH_AMERICA),
m03fd(),
m06e9(),
m02ff().set(1),
m0300().set("North America"),
m0246().set(IPv4Address('69.147.237.186'), region_server_ping_port)
],
[
m0448().set(REGION_EUROPE),
m03fd(),
m06e9(),
m02ff().set(2),
m0300().set("Europe"),
m0246().set(IPv4Address('95.211.127.133'), region_server_ping_port)
],
[
m0448().set(REGION_OCEANIA_AUSTRALIA),
m03fd(),
m06e9(),
m02ff().set(3),
m0300().set("Oceania/Australia"),
m0246().set(IPv4Address('221.121.148.81'), region_server_ping_port)
]
]
Does taserver or the udpproxy support being pinged by the user? If so, these hardcoded addresses could be replaced with a function to ping the game server directly.
Ta works a bit weird when it comes to ping. Before you have joined a server the ping in the server browser is taken from those echo servers (so all game servers in a region will get the same ping) . After having joined a game server in a region the ping for all servers in that region is taken from that game server. The in game ping is always taken from the game server.
A reason not to take ping from the game servers directly is that you will have to have the three ips for the region available at login time of the client, even if there aren't any servers for some of the regions at that time, and the servers that you do pick will need to stay online for as long as those clients are.
I think we should just close this issue, because I haven't heard about it in a long time and there's not enough info to investigate what happened.
Ah, that all makes sense. Could it be that the server browser shows 0 or 999 ping because it doesn't actually know the region of community-hosted servers? Or does taserver specify a region for itself? I'm interested in this issue because it still shows in the server browser for a few people. Although, it might be simpler to just remove ping numbers from the server browser list entirely, as with the few servers we have choosing between them based on ping isn't really necessary.
taserver specifies it based on the region of the IP. If people are still experiencing this, then it would be useful to get more info. Does it happen for them always? can they reproduce it easily? Is it for all servers in the list? Also we could check the code if there is any case where the region decision is undecisive and what does taserver fill in in that case.
In server browser everything shows 999 In game everything shows 0 Is there still a dependency on the Hirez infrastructure even after having joined a community server?