Daemon
Daemon copied to clipboard
LAN server not visible on Windows 10
Matias on Facebook told me he is not able to see his Unvanquished 0.50.0 LAN server while running Windows 10. This is what he did:
- create a LAN server on computer0
- start a client on computer1
- go to the LAN browser in computer1: no server is displayed
He posted this video.
He said he both tried to run a sever from the client GUI and as dedicated one.
This is probably an issue on Windows 10 side, I remember faldor reported another server-related issue on Windows 10 back in october: he was not able to correctly join his own server: map started to load but the loading never finished
I face the same issue on Linux too, running Unvanquished 0.50.0.
I have to explicitly pass the -port 27960
option to get it listed within in-game LAN browser (same within XQF), so I guess the issue is the game not starting on the default port.
This is known to work:
./daemonded -port 27960 +devmap vega
Fix /connect
not working as a user
By default the Windows Defender Firewall does not allow any UDP packets to be received on the local network. To fix this a firewall rule must be created to allow the packets. This requires admin privileges. The easiest way to do this is to click "Allow" on the firewall dialog that pops up the first time you use a Daemon executable (on a per-filesystem-path basis). If you clicked "X" or blocked it the first time, then go into the Windows Defender Firewall configuration, click Inbound Rules, sort by Program, find the rule matching the executable path, and delete the rule. Then run Daemon again and you'll get the dialog again.
The firewall rules are necessary for both Windows hosts and Windows clients.
Fix server listing as a user
Even when /connect
is working after following the above steps, listing local servers may not work because Daemon relies on broadcast packets to find servers, and Windows sends broadcasts only to the single interface which is "first in the list" (without regard to whether that interface is connected to anything). This is true for both Windows 10 and previous versions of Windows. With the default ordering on Windows 10, server listing may work on an Ethernet connection but is unlikely to work on Wi-Fi.
Two possible workarounds (both of these for non-host clients):
- Build WinIPBroadcast and run
WinIPBroadcast.exe run
as administrator while playing. - Make the network interface you're using first in the list:
- Open PowerShell as administrator.
- Enter
Get-NetIPInterface
and find the number of the LAN interface you're using in the first column (ifIndex). - Enter
Set-NetIPInterface -InterfaceIndex <number> -InterfaceMetric 0
where<number>
is the number you found in step 2.
Actions for Unvanquished developers
To fix packets being blocked, we can have the updater create firewall rules. This would also prevent the annoying firewall dialog from appearing which would be nice.
To fix server listing, maybe we can see what WinIPBroadcast does to send packets on multiple interfaces and copy that.
To fix packets being blocked, we can have the updater create firewall rules.
Hmm, that will complexify the updater a bit more, but yes it's why we have an updater. This would be another argument to discourage the universal zip over the updater and I don't see it as a problem, modern OS are not really compatible with “universal zip” method anyway.
To fix server listing, maybe we can see what WinIPBroadcast does to send packets on multiple interfaces and copy that.
We may want to iterate all the interfaces to broadcast on them. 😕
We already have code to iterate all the existing IP addresses, we may just rely on them, or do we need special stuff to bind a specific interface even if we bind a specific IP address?
IP: 127.0.0.1
IP: ???.???.???.???
IP6: ::1
IP6: ????:????:????:????:????:????%????
Opening IP6 socket: [::]:27960
Opening IP socket: 0.0.0.0:27960