dns: Add preferred_by rule item

This commit is contained in:
世界
2026-04-29 22:48:02 +08:00
parent 9b277bd690
commit 511e72bcfb
12 changed files with 208 additions and 4 deletions
+5
View File
@@ -86,6 +86,11 @@ type DNSTransport interface {
Exchange(ctx context.Context, message *dns.Msg) (*dns.Msg, error)
}
type DNSTransportWithPreferredDomain interface {
DNSTransport
PreferredDomain(domain string) bool
}
type DNSTransportRegistry interface {
option.DNSTransportOptionsRegistry
CreateDNSTransport(ctx context.Context, logger log.ContextLogger, tag string, transportType string, options any) (DNSTransport, error)