Fix config info loss when renaming a tunnel.

This migrates data to the new tunnel when renaming, such as: Description, OverridePeerSettings, PeerGroups, PeerHistoricalEndpointTracking, PeerTrafficTracking.
pull/1254/head
freetushkan 2026-04-30 04:46:19 +03:00
parent 90614a6360
commit 5af096f4f6
1 changed files with 5 additions and 0 deletions

View File

@ -1072,6 +1072,11 @@ class WireguardConfiguration:
doRenameStatement("_restrict_access")
doRenameStatement("_deleted")
doRenameStatement("_transfer")
conn.execute(
self.infoTable.update()
.where(self.infoTable.c.ID == self.Name)
.values(ID=newConfigurationName)
)
self.AllPeerJobs.updateJobConfigurationName(self.Name, newConfigurationName)
shutil.copy(