mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-03 15:56:17 +00:00
Added some new translation
This commit is contained in:
@@ -991,18 +991,18 @@ class Peer:
|
||||
os.remove(str(uid))
|
||||
if len(updatePsk.decode().strip("\n")) != 0:
|
||||
return ResponseObject(False,
|
||||
"Update peer failed when updating preshared key")
|
||||
"Update peer failed when updating Pre-Shared Key")
|
||||
updateAllowedIp = subprocess.check_output(
|
||||
f'wg set {self.configuration.Name} peer {self.id} allowed-ips "{allowed_ip.replace(" ", "")}"',
|
||||
shell=True, stderr=subprocess.STDOUT)
|
||||
if len(updateAllowedIp.decode().strip("\n")) != 0:
|
||||
return ResponseObject(False,
|
||||
"Update peer failed when updating allowed IPs")
|
||||
"Update peer failed when updating Allowed IPs")
|
||||
saveConfig = subprocess.check_output(f"wg-quick save {self.configuration.Name}",
|
||||
shell=True, stderr=subprocess.STDOUT)
|
||||
if f"wg showconf {self.configuration.Name}" not in saveConfig.decode().strip('\n'):
|
||||
return ResponseObject(False,
|
||||
"Update peer failed when saving the configuration.")
|
||||
"Update peer failed when saving the configuration")
|
||||
sqlUpdate(
|
||||
'''UPDATE '%s' SET name = ?, private_key = ?, DNS = ?, endpoint_allowed_ip = ?, mtu = ?,
|
||||
keepalive = ?, preshared_key = ? WHERE id = ?''' % self.configuration.Name,
|
||||
|
Reference in New Issue
Block a user