Open nicholas-tollner opened 8 months ago
Thanks for the PR @nicholas-tollner!
I took a quick look and apparently has a few things that can be adjusted before I merge it.
I'll be reviewing your changes in depth this weekend.
The method responsible for sniffing the network is Backend.initialize
(src/engine/backend.py
):
...
32 sniffer = AsyncSniffer(
33 iface=iface,
34 filter=f"(host {' or host '.join(login_servers.values())}) and len > 30",
35 prn=packet_callback,
36 store=False
37 )
38 sniffer.start()
...
On line 34
it uses the dict login_servers
values to build a filter query. It already listen to any of the servers, so it's not necessary for the user to select one.
The method that you changed (check_server_connection
) just sends an empty packet to check whether or not the server is alive.
Knowing that, I ask that you make a few changes before I approve and merge the PR:
Backend.check_server_connection
check connection for all servers, and fail if all fail (could warn the user if one or more servers are down)
Added support for connection to Asia server as well as changes to UI which enable users to switch between regions.