platform: Implement set underlying networks for android

This commit is contained in:
世界
2024-12-22 01:00:19 +08:00
parent f0f3a45904
commit eb4a184b7e
8 changed files with 43 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ type PlatformInterface interface {
StartDefaultInterfaceMonitor(listener InterfaceUpdateListener) error
CloseDefaultInterfaceMonitor(listener InterfaceUpdateListener) error
GetInterfaces() (NetworkInterfaceIterator, error)
SetUnderlyingNetworks(networks RawNetworkIterator) error
UnderNetworkExtension() bool
IncludeAllNetworks() bool
ReadWIFIState() *WIFIState
@@ -50,6 +51,8 @@ type NetworkInterface struct {
Type int32
DNSServer StringIterator
Metered bool
RawNetwork RawNetwork
}
type WIFIState struct {
@@ -66,6 +69,11 @@ type NetworkInterfaceIterator interface {
HasNext() bool
}
type RawNetworkIterator interface {
Next() RawNetwork
HasNext() bool
}
type Notification struct {
Identifier string
TypeName string