From 064fb9b873170595ace70b57b61914f1ff4e15f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 20 Aug 2024 18:56:50 +0800 Subject: [PATCH] Fix direct dialer not resolving domain --- common/dialer/dialer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/dialer/dialer.go b/common/dialer/dialer.go index a1721b28..56c5f2ad 100644 --- a/common/dialer/dialer.go +++ b/common/dialer/dialer.go @@ -28,13 +28,12 @@ func New(router adapter.Router, options option.DialerOptions) (N.Dialer, error) } else { dialer = NewDetour(router, options.Detour) } - domainStrategy := dns.DomainStrategy(options.DomainStrategy) - if domainStrategy != dns.DomainStrategyAsIS || options.Detour == "" { + if options.Detour == "" { dialer = NewResolveDialer( router, dialer, options.Detour == "" && !options.TCPFastOpen, - domainStrategy, + dns.DomainStrategy(options.DomainStrategy), time.Duration(options.FallbackDelay)) } return dialer, nil