mirror of https://github.com/v2ray/v2ray-core
parent
5003afc85c
commit
9b830fc432
@ -0,0 +1,14 @@
|
||||
package testing
|
||||
|
||||
type RouterConfig struct {
|
||||
StrategyValue string
|
||||
SettingsValue interface{}
|
||||
}
|
||||
|
||||
func (this *RouterConfig) Strategy() string {
|
||||
return this.StrategyValue
|
||||
}
|
||||
|
||||
func (this *RouterConfig) Settings() interface{} {
|
||||
return this.SettingsValue
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
"github.com/v2ray/v2ray-core/app/router/rules/config"
|
||||
)
|
||||
|
||||
type RouterRuleConfig struct {
|
||||
RuleList []*TestRule
|
||||
}
|
||||
|
||||
func (this *RouterRuleConfig) Rules() []config.Rule {
|
||||
rules := make([]config.Rule, len(this.RuleList))
|
||||
for idx, rule := range this.RuleList {
|
||||
rules[idx] = rule
|
||||
}
|
||||
return rules
|
||||
}
|
Loading…
Reference in new issue