1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 01:05:35 -05:00

register strategy config

This commit is contained in:
Shelikhoo
2021-09-07 11:48:24 +01:00
parent 30648c3e07
commit 6c934f9db0
5 changed files with 185 additions and 103 deletions

View File

@@ -1,6 +1,7 @@
package router
import (
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/dice"
)
@@ -19,3 +20,7 @@ func (s *RandomStrategy) PickOutbound(candidates []string) string {
}
return candidates[dice.Roll(count)]
}
func init() {
common.Must(common.RegisterConfig((*StrategyRandomConfig)(nil), nil))
}