Просмотр исходного кода

Revert applying NetworkLatencyMultiplier to HoldOffTunnelDuration

Rod Hynes 4 лет назад
Родитель
Сommit
68b5c93d8e
2 измененных файлов с 10 добавлено и 2 удалено
  1. 2 2
      psiphon/common/parameters/parameters.go
  2. 8 0
      psiphon/tunnel.go

+ 2 - 2
psiphon/common/parameters/parameters.go

@@ -612,8 +612,8 @@ var defaultParameters = map[string]struct {
 	CustomHostNameProbability:    {value: 0.0, minimum: 0.0},
 	CustomHostNameProbability:    {value: 0.0, minimum: 0.0},
 	CustomHostNameLimitProtocols: {value: protocol.TunnelProtocols{}},
 	CustomHostNameLimitProtocols: {value: protocol.TunnelProtocols{}},
 
 
-	HoldOffTunnelMinDuration:         {value: time.Duration(0), minimum: time.Duration(0), flags: useNetworkLatencyMultiplier},
-	HoldOffTunnelMaxDuration:         {value: time.Duration(0), minimum: time.Duration(0), flags: useNetworkLatencyMultiplier},
+	HoldOffTunnelMinDuration:         {value: time.Duration(0), minimum: time.Duration(0)},
+	HoldOffTunnelMaxDuration:         {value: time.Duration(0), minimum: time.Duration(0)},
 	HoldOffTunnelProtocols:           {value: protocol.TunnelProtocols{}},
 	HoldOffTunnelProtocols:           {value: protocol.TunnelProtocols{}},
 	HoldOffTunnelFrontingProviderIDs: {value: []string{}},
 	HoldOffTunnelFrontingProviderIDs: {value: []string{}},
 	HoldOffTunnelProbability:         {value: 0.0, minimum: 0.0},
 	HoldOffTunnelProbability:         {value: 0.0, minimum: 0.0},

+ 8 - 0
psiphon/tunnel.go

@@ -1161,6 +1161,14 @@ func dialTunnel(
 	// establish tunnels. By holding off post-connect, the client has this
 	// establish tunnels. By holding off post-connect, the client has this
 	// established tunnel ready to activate in case other protocols fail to
 	// established tunnel ready to activate in case other protocols fail to
 	// establish. This hold-off phase continues to consume one connection worker.
 	// establish. This hold-off phase continues to consume one connection worker.
+	//
+	// The network latency multiplier is not applied to HoldOffTunnelDuration,
+	// as the goal is to apply a consistent hold-off range across all tunnel
+	// candidates; and this avoids scaling up any delay users experience.
+	//
+	// The hold-off is applied regardless of whether this is the first tunnel
+	// in a session or a reconnection, even to a server affinity candidate,
+	// so that the advantage for other protocols persists.
 
 
 	if dialParams.HoldOffTunnelDuration > 0 {
 	if dialParams.HoldOffTunnelDuration > 0 {
 		NoticeHoldOffTunnel(dialParams.ServerEntry.GetDiagnosticID(), dialParams.HoldOffTunnelDuration)
 		NoticeHoldOffTunnel(dialParams.ServerEntry.GetDiagnosticID(), dialParams.HoldOffTunnelDuration)