platform: Add UsePlatformAutoDetectInterfaceControl

This commit is contained in:
世界
2023-04-21 17:04:55 +08:00
parent ec13965fd0
commit 3a92bf993d
4 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,10 @@ func (w *platformInterfaceWrapper) Initialize(ctx context.Context, router adapte
return nil
}
func (w *platformInterfaceWrapper) UsePlatformAutoDetectInterfaceControl() bool {
return w.iif.UsePlatformAutoDetectInterfaceControl()
}
func (w *platformInterfaceWrapper) AutoDetectInterfaceControl() control.Func {
return func(network, address string, conn syscall.RawConn) error {
return control.Raw(conn, func(fd uintptr) error {