Rod Hynes 7 лет назад
Родитель
Сommit
13a9a07d84
2 измененных файлов с 8 добавлено и 4 удалено
  1. 4 0
      psiphon/config.go
  2. 4 4
      psiphon/dialParameters.go

+ 4 - 0
psiphon/config.go

@@ -271,6 +271,10 @@ type Config struct {
 	// handling, and application of parameters.
 	DisableTactics bool
 
+	// DisableReplay causes any persisted dial parameters to be ignored when
+	// they would otherwise be used for replay.
+	DisableReplay bool
+
 	// TransformHostNames specifies whether to use hostname transformation
 	// circumvention strategies. Set to "always" to always transform, "never"
 	// to never transform, and "", the default, for the default transformation

+ 4 - 4
psiphon/dialParameters.go

@@ -205,11 +205,11 @@ func MakeDialParameters(
 	}
 
 	if dialParams != nil {
-		if !canReplay(serverEntry, dialParams.TunnelProtocol) {
+		if config.DisableReplay ||
+			!canReplay(serverEntry, dialParams.TunnelProtocol) {
 
-			// In this ephemeral case, existing dial parameters may still be
-			// valid and used in future establishment phases, and so are
-			// retained.
+			// In these ephemeral cases, existing dial parameters may still be valid
+			// and used in future establishment phases, and so are retained.
 
 			dialParams = nil
 		}