Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion proton/vpn/backend/networkmanager/core/nmclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,24 @@ 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.
)
]

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]:
Expand Down