From c958a205657e9ca428bf52c9d78c3495592ffa33 Mon Sep 17 00:00:00 2001 From: v2ray Date: Sat, 23 Jan 2016 10:58:26 +0100 Subject: [PATCH] default value for strategy random --- shell/point/config_json.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell/point/config_json.go b/shell/point/config_json.go index bcdb979c..a1413bd0 100644 --- a/shell/point/config_json.go +++ b/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 }