cmd/cli: use powershell to get physical interfaces

This commit is contained in:
Cuong Manh Le
2024-09-20 21:57:12 +07:00
committed by Cuong Manh Le
parent 5a88a7c22c
commit cfe1209d61
3 changed files with 20 additions and 42 deletions
+1
View File
@@ -49,6 +49,7 @@ func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bo
return ok
}
// validInterfacesMap returns a set of all valid hardware ports.
func validInterfacesMap() map[string]struct{} {
b, err := exec.Command("networksetup", "-listallhardwareports").Output()
if err != nil {