From 8f82969eb5edf3b90d738d4995f237bd1f1be6b1 Mon Sep 17 00:00:00 2001 From: WildSoft Date: Fri, 16 Oct 2026 11:12:09 +0300 Subject: [PATCH] Update public source --- gui/app.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gui/app.py b/gui/app.py index 9979043..4493969 100644 --- a/gui/app.py +++ b/gui/app.py @@ -617,7 +617,7 @@ def get_nm_wifi_devices(): return devices, None -def get_active_vpn_connections(): +def get_active_wireguard_connections(): command = [ "nmcli", @@ -646,7 +646,7 @@ def get_active_vpn_connections(): except Exception as error: - return [], f"NetworkManager VPN query failed: {error}" + return [], str(error) if result.returncode != 0: @@ -658,7 +658,7 @@ def get_active_vpn_connections(): return [], error - vpn_connections = [] + wireguard_connections = [] for line in result.stdout.splitlines(): @@ -669,16 +669,16 @@ def get_active_vpn_connections(): connection_type, device = parts - if connection_type in ("vpn", "wireguard"): + if connection_type == "wireguard": - vpn_connections.append( + wireguard_connections.append( { "type": connection_type, "device": device } ) - return vpn_connections, None + return wireguard_connections, None def get_wifi_interfaces(): @@ -2441,8 +2441,8 @@ def api_network_wifi_devices(): devices, error = get_nm_wifi_devices() - vpn_connections, vpn_error = ( - get_active_vpn_connections() + wireguard_connections, wireguard_error = ( + get_active_wireguard_connections() ) if error: @@ -2517,9 +2517,9 @@ def api_network_wifi_devices(): if not devices else None ), - "vpn_active": bool(vpn_connections), - "vpn_connections": vpn_connections, - "vpn_error": vpn_error + "wireguard_active": bool(wireguard_connections), + "wireguard_connections": wireguard_connections, + "wireguard_error": wireguard_error } )