mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-26 17:03:02 +00: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{
|
dialer := &net.Dialer{
|
||||||
Timeout: time.Second * 16,
|
Timeout: time.Second * 16,
|
||||||
DualStack: true,
|
|
||||||
LocalAddr: resolveSrcAddr(dest.Network, src),
|
LocalAddr: resolveSrcAddr(dest.Network, src),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +173,7 @@ func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net
|
|||||||
// xray:api:stable
|
// xray:api:stable
|
||||||
func UseAlternativeSystemDialer(dialer SystemDialer) {
|
func UseAlternativeSystemDialer(dialer SystemDialer) {
|
||||||
if dialer == nil {
|
if dialer == nil {
|
||||||
effectiveSystemDialer = &DefaultSystemDialer{}
|
dialer = &DefaultSystemDialer{}
|
||||||
}
|
}
|
||||||
effectiveSystemDialer = dialer
|
effectiveSystemDialer = dialer
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user