From ef4c63812bb750893cb009eed78d157aa2900689 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Tue, 12 Oct 2021 11:32:45 -0400 Subject: [PATCH] Fix: nullcheck on alternative systemDialer (#752) * fix: null-check on alternative systemDialer * delete deprecated option DualStack Co-authored-by: rurirei <72071920+rurirei@users.noreply.github.com> --- transport/internet/system_dialer.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transport/internet/system_dialer.go b/transport/internet/system_dialer.go index 8a0fb89a..9932300b 100644 --- a/transport/internet/system_dialer.go +++ b/transport/internet/system_dialer.go @@ -74,7 +74,6 @@ func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest ne dialer := &net.Dialer{ Timeout: time.Second * 16, - DualStack: true, LocalAddr: resolveSrcAddr(dest.Network, src), } @@ -174,7 +173,7 @@ func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net // xray:api:stable func UseAlternativeSystemDialer(dialer SystemDialer) { if dialer == nil { - effectiveSystemDialer = &DefaultSystemDialer{} + dialer = &DefaultSystemDialer{} } effectiveSystemDialer = dialer }