micahmo / WgServerforWindows

Wg Server for Windows (WS4W) is a desktop application that allows running and managing a WireGuard server endpoint on Windows
MIT License
943 stars 92 forks source link

Enable configuration of PersistentKeepalive in client configuration #148

Closed brandonros closed 9 months ago

brandonros commented 9 months ago

https://unix.stackexchange.com/questions/714145/wireguard-not-able-to-connect-after-a-few-minutes

micahmo commented 9 months ago

Thanks for the suggestion! As a workaround, you can set the Persistent Keepalive in the server config. But it will apply globally to all clients. It should be moved to a per-client config option.

brandonros commented 9 months ago

am I right to say that if you said it manually in the config file for the clients that it stands to be overwritten the next time any change is made via the GUI?

micahmo commented 9 months ago

Yes you are right. If you press the Save button in either the Server or Client config, it will rewrite the WireGuard files according to what it thinks they're supposed to be.

micahmo commented 9 months ago

Hey @brandonros, this feature should be added in the latest release, v2.0.11. Feel free to check it out and let me know if this works for you.

brandonros commented 9 months ago

@micahmo thank you for all of the hard work you do for the community. will test and report back if there are any issues. highly appreciate it.

brandonros commented 6 months ago

@micahmo hey, sorry to bother you. i'm 99% sure on latest release this doesn't work as expected 100%. in clients_wg folder the [Peer] is missing PersistentKeepalive = 25 for example and it gets overridden everytime a change is made in the UI

brandonros commented 6 months ago

https://github.com/micahmo/WgServerforWindows/blob/55e9197cfeb9f60c6def32ff268ddbc97916e20a/WgServerforWindows/Models/ClientConfigurationsPrerequisite.cs#L238

If I had to guess it was getting dropped there