From acc1233b117996061c1aa486bf925a2f6f12c1b7 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 13 Sep 2025 14:49:29 +0800 Subject: [PATCH] Update AmneziaWireguardConfiguration.py --- src/modules/AmneziaWireguardConfiguration.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/modules/AmneziaWireguardConfiguration.py b/src/modules/AmneziaWireguardConfiguration.py index 31d6d2c2..8223d01f 100644 --- a/src/modules/AmneziaWireguardConfiguration.py +++ b/src/modules/AmneziaWireguardConfiguration.py @@ -52,6 +52,7 @@ class AmneziaWireguardConfiguration(WireguardConfiguration): "ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers))), "TotalPeers": len(self.Peers), "Protocol": self.Protocol, + "Table": self.Table, "Jc": self.Jc, "Jmin": self.Jmin, "Jmax": self.Jmax, @@ -227,20 +228,10 @@ class AmneziaWireguardConfiguration(WireguardConfiguration): "remote_endpoint": self.DashboardConfig.GetConfig("Peers", "remote_endpoint")[1], "preshared_key": i["PresharedKey"] if "PresharedKey" in i.keys() else "" } - # sqlUpdate( - # """ - # INSERT INTO '%s' - # VALUES (:id, :private_key, :DNS, :advanced_security, :endpoint_allowed_ip, :name, :total_receive, :total_sent, - # :total_data, :endpoint, :status, :latest_handshake, :allowed_ip, :cumu_receive, :cumu_sent, - # :cumu_data, :mtu, :keepalive, :remote_endpoint, :preshared_key); - # """ % self.Name - # , newPeer) conn.execute( self.peersTable.insert().values(tempPeer) ) else: - # sqlUpdate("UPDATE '%s' SET allowed_ip = ? WHERE id = ?" % self.Name, - # (i.get("AllowedIPs", "N/A"), i['PublicKey'],)) conn.execute( self.peersTable.update().values({ "allowed_ip": i.get("AllowedIPs", "N/A")