20 lines
305 B
Go
Raw Normal View History

2015-12-07 22:47:47 +01:00
package rules
2015-11-21 21:43:40 +01: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 21:43:40 +01:00
}
2015-12-07 22:47:47 +01: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 23:21:54 +01:00
Rules []*Rule
ResolveDomain bool
2015-12-07 22:47:47 +01:00
}