Parcourir la source

default value for strategy random

v2ray il y a 9 ans
Parent
commit
c958a20565
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      shell/point/config_json.go

+ 8 - 0
shell/point/config_json.go

@@ -128,6 +128,14 @@ func (this *InboundDetourConfig) UnmarshalJSON(data []byte) error {
 			Refresh:  DefaultRefreshMinute,
 		}
 	}
+	if this.Allocation.Strategy == AllocationStrategyRandom {
+		if this.Allocation.Refresh == 0 {
+			this.Allocation.Refresh = 5
+		}
+		if this.Allocation.Concurrency == 0 {
+			this.Allocation.Concurrency == 3
+		}
+	}
 	return nil
 }