mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
Fix: nullcheck on alternative systemDialer (#959)
* fix: null-check on alternative systemDialer * delete deprecated option DualStack
This commit is contained in:
parent
980fb59878
commit
1822504ed8
@ -68,7 +68,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),
|
||||
}
|
||||
|
||||
@ -160,7 +159,7 @@ func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net
|
||||
// v2ray:api:stable
|
||||
func UseAlternativeSystemDialer(dialer SystemDialer) {
|
||||
if dialer == nil {
|
||||
effectiveSystemDialer = &DefaultSystemDialer{}
|
||||
dialer = &DefaultSystemDialer{}
|
||||
}
|
||||
effectiveSystemDialer = dialer
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user