Add experimental_fix_windows_firewall option for system tun stack

This commit is contained in:
世界
2023-05-09 12:26:13 +08:00
parent 57f87eab87
commit ff1c1ef4c9
10 changed files with 71 additions and 46 deletions

View File

@@ -18,6 +18,7 @@ type PlatformInterface interface {
CloseDefaultInterfaceMonitor(listener InterfaceUpdateListener) error
UsePlatformInterfaceGetter() bool
GetInterfaces() (NetworkInterfaceIterator, error)
UnderNetworkExtension() bool
}
type TunInterface interface {

View File

@@ -22,6 +22,7 @@ type Interface interface {
CreateDefaultInterfaceMonitor(errorHandler E.Handler) tun.DefaultInterfaceMonitor
UsePlatformInterfaceGetter() bool
Interfaces() ([]NetworkInterface, error)
UnderNetworkExtension() bool
process.Searcher
io.Writer
}

View File

@@ -169,3 +169,7 @@ func (w *platformInterfaceWrapper) Interfaces() ([]platform.NetworkInterface, er
}
return interfaces, nil
}
func (w *platformInterfaceWrapper) UnderNetworkExtension() bool {
return w.iif.UnderNetworkExtension()
}