platform: Add http proxy support for Windows

This commit is contained in:
世界
2026-08-30 17:41:42 +08:00
parent 9eb60234fc
commit 4f330d73ec
24 changed files with 862 additions and 72 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ func NewNetworkManager(ctx context.Context, logger logger.ContextLogger, options
return nil, E.New("`auto_detect_interface` is required by `default_network_strategy`")
}
}
usePlatformDefaultInterfaceMonitor := nm.platformInterface != nil
usePlatformDefaultInterfaceMonitor := nm.platformInterface != nil && nm.platformInterface.UsePlatformDefaultInterfaceMonitor()
enforceInterfaceMonitor := options.AutoDetectInterface
if !usePlatformDefaultInterfaceMonitor {
networkMonitor, err := tun.NewNetworkUpdateMonitor(logger)
@@ -503,7 +503,7 @@ func (r *NetworkManager) notifyInterfaceUpdate(defaultInterface *control.Interfa
vpnStatus = "disabled"
}
options = append(options, "vpn "+vpnStatus)
} else if r.platformInterface != nil {
} else if r.platformInterface != nil && r.platformInterface.UsePlatformNetworkInterfaces() {
networkInterface := common.Find(r.networkInterfaces.Load(), func(it adapter.NetworkInterface) bool {
return it.Interface.Index == defaultInterface.Index
})