Fix resolve dialer

This commit is contained in:
世界 2023-09-27 13:17:16 +08:00
parent df9050400e
commit 7840dc73e3
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 14 additions and 3 deletions

View file

@ -29,7 +29,12 @@ func New(router adapter.Router, options option.DialerOptions) (N.Dialer, error)
}
domainStrategy := dns.DomainStrategy(options.DomainStrategy)
if domainStrategy != dns.DomainStrategyAsIS || options.Detour == "" {
dialer = NewResolveDialer(router, dialer, domainStrategy, time.Duration(options.FallbackDelay))
dialer = NewResolveDialer(
router,
dialer,
options.Detour == "" && !options.TCPFastOpen,
domainStrategy,
time.Duration(options.FallbackDelay))
}
return dialer, nil
}