cmd/cli: extend list of valid interfaces for MacOS

By parsing "networksetup -listallhardwareports" output to get list of
available hardware ports.
This commit is contained in:
Cuong Manh Le
2024-08-07 15:51:11 +07:00
committed by Cuong Manh Le
parent 82e0d4b0c4
commit 5f4a399850
5 changed files with 80 additions and 20 deletions
+3 -1
View File
@@ -6,4 +6,6 @@ import "net"
func patchNetIfaceName(iface *net.Interface) error { return nil }
func validInterface(iface *net.Interface) bool { return true }
func validInterface(iface *net.Interface, validIfacesMap map[string]struct{}) bool { return true }
func validInterfacesMap() map[string]struct{} { return nil }