2024-11-10 12:11:21 +08:00
|
|
|
package adapter
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/sagernet/sing-tun"
|
|
|
|
"github.com/sagernet/sing/common/control"
|
|
|
|
)
|
|
|
|
|
|
|
|
type NetworkManager interface {
|
2024-11-10 16:46:59 +08:00
|
|
|
Lifecycle
|
2024-11-10 12:11:21 +08:00
|
|
|
InterfaceFinder() control.InterfaceFinder
|
|
|
|
UpdateInterfaces() error
|
|
|
|
DefaultInterface() string
|
|
|
|
AutoDetectInterface() bool
|
|
|
|
AutoDetectInterfaceFunc() control.Func
|
|
|
|
DefaultMark() uint32
|
|
|
|
RegisterAutoRedirectOutputMark(mark uint32) error
|
|
|
|
AutoRedirectOutputMark() uint32
|
|
|
|
NetworkMonitor() tun.NetworkUpdateMonitor
|
|
|
|
InterfaceMonitor() tun.DefaultInterfaceMonitor
|
|
|
|
PackageManager() tun.PackageManager
|
|
|
|
WIFIState() WIFIState
|
|
|
|
ResetNetwork()
|
|
|
|
}
|