mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-18 01:58:41 +00:00
remove "enabled" option
This commit is contained in:
parent
f118855aae
commit
4ca6302ad4
6 changed files with 93 additions and 83 deletions
|
@ -255,7 +255,7 @@ func DialSystem(ctx context.Context, dest net.Destination, sockopt *SocketConfig
|
|||
if sockopt.DomainStrategy.forceIP() {
|
||||
return nil, err
|
||||
}
|
||||
} else if !sockopt.HappyEyeballs.Enabled || len(ips) < 2 || len(sockopt.DialerProxy) > 0 || dest.Network != net.Network_TCP {
|
||||
} else if (sockopt.HappyEyeballs != nil && (sockopt.HappyEyeballs.TryDelayMs == 0 || sockopt.HappyEyeballs.MaxConcurrentTry == 0)) || len(ips) < 2 || len(sockopt.DialerProxy) > 0 || dest.Network != net.Network_TCP {
|
||||
dest.Address = net.IPAddress(ips[dice.Roll(len(ips))])
|
||||
errors.LogInfo(ctx, "replace destination with "+dest.String())
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue