Add wifi_ssid and wifi_bssid route and DNS rules

This commit is contained in:
世界
2023-11-18 13:51:32 +08:00
parent 83f6e022bb
commit 0e50872d04
15 changed files with 170 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ type PlatformInterface interface {
UsePlatformInterfaceGetter() bool
GetInterfaces() (NetworkInterfaceIterator, error)
UnderNetworkExtension() bool
ReadWIFIState() *WIFIState
ClearDNSCache()
}
@@ -38,6 +39,15 @@ type NetworkInterface struct {
Addresses StringIterator
}
type WIFIState struct {
SSID string
BSSID string
}
func NewWIFIState(wifiSSID string, wifiBSSID string) *WIFIState {
return &WIFIState{wifiSSID, wifiBSSID}
}
type NetworkInterfaceIterator interface {
Next() *NetworkInterface
HasNext() bool