Fix default dns server option (#9)

This commit is contained in:
iKirby 2022-08-10 12:18:03 +08:00 committed by GitHub
parent 0e6b4df8f1
commit ccdfab378a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,9 +217,9 @@ func NewRouter(ctx context.Context, logger log.ContextLogger, dnsLogger log.Cont
}
var defaultTransport dns.Transport
if dnsOptions.Final != "" {
defaultTransport = dummyTransportMap[options.Final]
defaultTransport = dummyTransportMap[dnsOptions.Final]
if defaultTransport == nil {
return nil, E.New("default dns server not found: ", options.Final)
return nil, E.New("default dns server not found: ", dnsOptions.Final)
}
}
if defaultTransport == nil {