Refactor local DNS cache partitioning

This commit is contained in:
世界
2026-08-30 17:41:45 +08:00
parent 96fe4f7317
commit 4e91d92c5f
10 changed files with 434 additions and 56 deletions
+3
View File
@@ -3,6 +3,7 @@ package adapter
import (
"encoding/hex"
"net"
"net/netip"
"strings"
"time"
@@ -18,6 +19,7 @@ type NetworkManager interface {
UpdateInterfaces() error
DefaultNetworkInterface() *NetworkInterface
NetworkInterfaces() []NetworkInterface
NetworkEnvironment() uint64
AutoDetectInterface() bool
AutoDetectInterfaceFunc() control.Func
ProtectFunc() control.Func
@@ -76,6 +78,7 @@ type NetworkInterface struct {
control.Interface
Type C.InterfaceType
DNSServers []string
Gateways []netip.Addr
Expensive bool
Constrained bool
}