donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python w/ Flask
Apache License 2.0
1.4k stars 202 forks source link

WGDashboard should inform the user that there's a discrepancy between the actual interface status and wg-quick configuration file #165

Open Quintasan opened 2 years ago

Quintasan commented 2 years ago

Is your feature request related to a problem? Please describe.

As outlined in https://github.com/donaldzou/WGDashboard/issues/164#issuecomment-1079265393 - if anything/anyone modifies the wireguard interface being configured AND SaveConfig is enabled then wg-quick will OVERWRITE the configuration file with the actual status of the interface

Describe the solution you'd like

An error message saying that there was a manual change to the interface would be a good start.

Bonus points if it's possible to show the differences and take appropriate action based on user's decision

donaldzou commented 2 years ago

Yeah the reason the dashboard need SaveConfig to be true is the dashboard is add/remove peer through wireguard command, instead of changing the .conf directly, to prevent format issue and other things. So each time, wireguard will edit the file.

donaldzou commented 2 years ago

I think you should can try to wg-quick down wg0 then add all information (set SaveConfig to be true), then bring it back up. and try adding peers.