[object Object]

← back to Exo

prio mac check for interface

24130da4fdae7a71650d60c59dd18e857c4b5809 · 2024-12-07 18:10:07 +0000 · Alex Cheema

Files touched

Diff

commit 24130da4fdae7a71650d60c59dd18e857c4b5809
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Sat Dec 7 18:10:07 2024 +0000

    prio mac check for interface
---
 exo/helpers.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/exo/helpers.py b/exo/helpers.py
index 5abc50cd..02d07055 100644
--- a/exo/helpers.py
+++ b/exo/helpers.py
@@ -277,6 +277,11 @@ async def get_macos_interface_type(ifname: str) -> Optional[Tuple[int, str]]:
   return None
 
 async def get_interface_priority_and_type(ifname: str) -> Tuple[int, str]:
+  # On macOS, try to get interface type using networksetup
+  if psutil.MACOS:
+    macos_type = await get_macos_interface_type(ifname)
+    if macos_type is not None: return macos_type
+
   # Local container/virtual interfaces
   if (ifname.startswith(('docker', 'br-', 'veth', 'cni', 'flannel', 'calico', 'weave')) or
     'bridge' in ifname):
@@ -286,11 +291,6 @@ async def get_interface_priority_and_type(ifname: str) -> Tuple[int, str]:
   if ifname.startswith('lo'):
     return (6, "Loopback")
 
-  # On macOS, try to get interface type using networksetup
-  if psutil.MACOS:
-    macos_type = await get_macos_interface_type(ifname)
-    if macos_type is not None: return macos_type
-
   # Traditional detection for non-macOS systems or fallback
   if ifname.startswith(('tb', 'nx', 'ten')):
     return (5, "Thunderbolt")

← 31d7bc2d subprocess fork fix  ·  back to Exo  ·  fix token encode to use the right model 9f86737a →