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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user