Refactor: use native Win32 API to detect interface changed on Windows
This commit is contained in:
@@ -18,10 +18,21 @@ var StackTypeMapping = map[string]TUNStack{
|
||||
const (
|
||||
TunGvisor TUNStack = iota
|
||||
TunSystem
|
||||
|
||||
TunDisabled TUNState = iota
|
||||
TunEnabled
|
||||
TunPaused
|
||||
)
|
||||
|
||||
type TUNStack int
|
||||
|
||||
type TUNState int
|
||||
|
||||
type TUNChangeCallback interface {
|
||||
Pause()
|
||||
Resume()
|
||||
}
|
||||
|
||||
// UnmarshalYAML unserialize TUNStack with yaml
|
||||
func (e *TUNStack) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
var tp string
|
||||
|
||||
Reference in New Issue
Block a user