mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +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
1 changed files with 1 additions and 2 deletions
|
@ -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 a new issue