diff --git a/proton/vpn/backend/networkmanager/core/nmclient.py b/proton/vpn/backend/networkmanager/core/nmclient.py index 6fd4bfa..b41c990 100644 --- a/proton/vpn/backend/networkmanager/core/nmclient.py +++ b/proton/vpn/backend/networkmanager/core/nmclient.py @@ -303,7 +303,8 @@ def is_physical_connection(active_connection): NM.SETTING_WIRELESS_SETTING_NAME, # Wifi NM.SETTING_GSM_SETTING_NAME, # USB+Dongle NM.SETTING_CDMA_SETTING_NAME, # USB+Dongle - NM.SETTING_BRIDGE_SETTING_NAME # Bridge + NM.SETTING_BRIDGE_SETTING_NAME, # Bridge + NM.SETTING_VLAN_SETTING_NAME # VLAN ) for active_connection in self._nm_client.get_active_connections(): diff --git a/proton/vpn/backend/networkmanager/killswitch/wireguard/nmclient.py b/proton/vpn/backend/networkmanager/killswitch/wireguard/nmclient.py index 24ed342..85663c9 100644 --- a/proton/vpn/backend/networkmanager/killswitch/wireguard/nmclient.py +++ b/proton/vpn/backend/networkmanager/killswitch/wireguard/nmclient.py @@ -215,10 +215,14 @@ def _add_connection_async(): return future_conn_activated def get_physical_devices(self) -> List[NM.Device]: - """Returns all the active ethernet/wifi devices.""" + """Returns all the active ethernet/wifi/vlan devices.""" return [ device for device in self._nm_client.get_devices() if ( - device.get_device_type() in (NM.DeviceType.ETHERNET, NM.DeviceType.WIFI) + device.get_device_type() in ( + NM.DeviceType.ETHERNET, + NM.DeviceType.WIFI, + NM.DeviceType.VLAN, + ) and device.get_state() is NM.DeviceState.ACTIVATED and device.get_active_connection() # Maybe this is redundant. ) @@ -226,7 +230,9 @@ def get_physical_devices(self) -> List[NM.Device]: def _is_ethernet_or_wifi_connection(self, active_connection: NM.ActiveConnection): return active_connection.props.type in ( - NM.SETTING_WIRED_SETTING_NAME, NM.SETTING_WIRELESS_SETTING_NAME + NM.SETTING_WIRED_SETTING_NAME, + NM.SETTING_WIRELESS_SETTING_NAME, + NM.SETTING_VLAN_SETTING_NAME, ) def get_ethernet_and_wifi_connections(self) -> List[NM.ActiveConnection]: