Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup

2021-01-29 Thread Jason A. Donenfeld
Hey Joshua, Ahhh that's a good point -- users sometimes must manually connect. And in this case, you're expecting for WireGuard to resolve those hosts and turn on the second a connection is available. I suppose it should be possible to detect when we're started at boot (not sure how yet) and retr

Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup

2021-01-28 Thread Joshua Sjoding
Someone could power the laptop up but wait hours before they connect it to their hotspot. For scenarios like that the current algorithm seems insufficient. My preference would be to listen for network changes while in a failed state, then re-run the existing algorithm whenever a network connect/di

Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup

2021-01-28 Thread Jason A. Donenfeld
On Fri, Jan 29, 2021 at 1:39 AM Mike O'Connor wrote: > > Hi Jason > > I'm not a windows users so can not test, but it seems to me that > Microsoft have API's to indicate the network status. > > This to indicate if there is a connection > https://docs.microsoft.com/en-us/windows/win32/api/wininet/n

Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup

2021-01-28 Thread Mike O'Connor
Hi Jason I'm not a windows users so can not test, but it seems to me that Microsoft have API's to indicate the network status. This to indicate if there is a connection https://docs.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetgetconnectedstate This to indicate if there is

Re: WireGuard for Windows tunnel deactivation after prolonged resolution failure during startup

2021-01-28 Thread Jason A. Donenfeld
Hi Joshua, Thanks for the bug report. Windows is usually all about heuristics. Here's the current algorithm: - If the system has booted within the last 4 minutes, it retries 40 times. Otherwise it retries 10 times. - If the resolution fails with a temporary error, or if it fails with a permanent