瀏覽代碼

default value for strategy random

v2ray 9 年之前
父節點
當前提交
c958a20565
共有 1 個文件被更改,包括 8 次插入0 次删除
  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,
 			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
 	return nil
 }
 }