Fix default dns transport strategy

This commit is contained in:
世界 2022-11-19 22:39:30 +08:00
parent a2d2ec9b45
commit 22a22aebe2
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -37,7 +37,11 @@ func (r *Router) matchDNS(ctx context.Context) (context.Context, dns.Transport,
r.dnsLogger.ErrorContext(ctx, "transport not found: ", detour)
}
}
if domainStrategy, dsLoaded := r.transportDomainStrategy[r.defaultTransport]; dsLoaded {
return ctx, r.defaultTransport, domainStrategy
} else {
return ctx, r.defaultTransport, r.defaultDomainStrategy
}
}
func (r *Router) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error) {