mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Get the list of all interfaces that have been assigned an IP address.
>networksetup -listallnetworkservices An asterisk (*) denotes that a network service is disabled. USB 10/100/1000 LAN Wi-Fi Outline SFM >networksetup -getinfo SFM IPv6: Automatic IPv6 IP address: none IPv6 Router: none > networksetup -getinfo Wi-Fi DHCP Configuration IP address: 192.168.1.5 Subnet mask: 255.255.255.0 Router: 192.168.1.1 Client ID: IPv6: Automatic IPv6 IP address: none IPv6 Router: none Wi-Fi ID: 60:3e:5f:7d:70:ea Signed-off-by: Dariush Ahmadi <68775308+gdariushahmadi@users.noreply.github.com>
This commit is contained in:
parent
1b6da347eb
commit
8867e6a0a2
@ -133,7 +133,7 @@ func getMacOSActiveNetworkHardwarePorts() ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if strings.Contains(string(serviceContent), "IP address:") {
|
||||
if strings.Contains(string(serviceContent), "IP address:") && !strings.Contains(string(serviceContent), "IP address: none") {
|
||||
hardwarePorts = append(hardwarePorts, line)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user