Improve local dns transport

This commit is contained in:
世界 2022-10-29 17:37:11 +08:00
parent b0c39ac7ff
commit 90a94a8c63
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
3 changed files with 4 additions and 4 deletions

View file

@ -234,7 +234,7 @@ func NewRouter(ctx context.Context, logger log.ContextLogger, dnsLogger log.Cont
}
if defaultTransport == nil {
if len(transports) == 0 {
transports = append(transports, &dns.LocalTransport{})
transports = append(transports, dns.NewLocalTransport(dialer.NewRouter(router)))
}
defaultTransport = transports[0]
}