7 ms·
Ask HN: How to prevent WireGuard from giving up?
We are testing wireguard and we like it. However, if it can't resolve DNS 10 times, it quits. For Windows non-admins, the only solution is for them to a) notice that Wireguard gave up b) reboot.
Wireguard is open source.
I would contribute a pull request with a "don't give up" number of retries, but I could not find how.
I might be able to build the driver from source but it would have to be self-signed, which would cause other problems. Suggestions?
- LinuxBender 3y agoI've never used WG on Windows so I am entirely guessing at ideas here. - One option may be to connect to an IP vs a name. - This is probably not a good idea and may even mask problems or create more problems down the road, but one quick and dirty work around may be to create a local hosts file entry for the endpoint assuming it has a static IP that does not change and assuming you have management nodes that can mass-update the host file entry on all your clients. I am assuming this is part of an AD forest. - Perhaps an even more clunky solution would be to set the registry key [1] that allows running dangerous scripts and then have a PowerShell script that tries to resolve the VPN node and if it can't, sleeps, tries again, then after {n} tries resets the interface. Both of these ideas are probably quite bad and will probably cause a future admin to shake their fists in anger so I would put a "time to live" on any work-around. Ensure this script can only be modified by administrators. The best answer is probably a feature request to the WireGuard maintainers to put in more registry keys and tunables and retry mechanisms to deal with mobile and ephemeral networks. [1] - https://git.zx2c4.com/wireguard-windows/about/docs/adminregistry.md https://git.zx2c4.com/wireguard-windows/about/docs/adminregi...
- andromaton 3y agoThank you. We are already doing the retry you suggested, and had to whitelist it on the antivirus. I agree not optimal. Any ideas how to submit a request to the maintainers? We've donated to the project in the past but I don't want to link the two.
- LinuxBender 3y agoIf this [1] is what you are using then create an issue on Github describing your setup, the issue and detailed steps to reproduce it. It appears they have 43 contributors so hopefully someone will have ideas. [1] - https://github.com/WireGuard/wireguard-windows https://github.com/WireGuard/wireguard-windows
- andromaton 3y agoWill do. Thanks again. I was looking at the primary repo and didn't notice this GitHub mirror.