mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-04 20:19:19 +02:00
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>
This commit is contained in:
parent
e50f2af418
commit
ef4c63812b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue