2015-12-07 21:47:47 +00:00
|
|
|
package rules
|
2015-11-21 20:43:40 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
|
|
|
)
|
|
|
|
|
2016-01-17 15:20:49 +00:00
|
|
|
type Rule struct {
|
|
|
|
Tag string
|
|
|
|
Condition Condition
|
2015-11-21 20:43:40 +00:00
|
|
|
}
|
2015-12-07 21:47:47 +00:00
|
|
|
|
2016-01-17 15:20:49 +00:00
|
|
|
func (this *Rule) Apply(dest v2net.Destination) bool {
|
|
|
|
return this.Condition.Apply(dest)
|
|
|
|
}
|
|
|
|
|
|
|
|
type RouterRuleConfig struct {
|
2016-02-01 22:21:54 +00:00
|
|
|
Rules []*Rule
|
|
|
|
ResolveDomain bool
|
2015-12-07 21:47:47 +00:00
|
|
|
}
|