ソースを参照

add special case for USB adapter over ethernet

Alex Cheema 5 ヶ月 前
コミット
6d09b4ae42
1 ファイル変更5 行追加0 行削除
  1. 5 0
      exo/helpers.py

+ 5 - 0
exo/helpers.py

@@ -262,6 +262,11 @@ async def get_macos_interface_type(ifname: str) -> Optional[Tuple[int, str]]:
         # Ethernet adapters
         # Ethernet adapters
         if 'Ethernet' in hw_port:
         if 'Ethernet' in hw_port:
           return (4, "Ethernet")
           return (4, "Ethernet")
+        if 'USB' in hw_port:
+          if 'en' in ifname:
+            return (4, "Ethernet (USB Adapter)")
+          else:
+            return (4, "USB")
 
 
         # WiFi
         # WiFi
         if hw_port == 'Wi-Fi':
         if hw_port == 'Wi-Fi':