mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-04 17:27:23 -05:00
20 lines
305 B
Go
20 lines
305 B
Go
package rules
|
|
|
|
import (
|
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
|
)
|
|
|
|
type Rule struct {
|
|
Tag string
|
|
Condition Condition
|
|
}
|
|
|
|
func (this *Rule) Apply(dest v2net.Destination) bool {
|
|
return this.Condition.Apply(dest)
|
|
}
|
|
|
|
type RouterRuleConfig struct {
|
|
Rules []*Rule
|
|
ResolveDomain bool
|
|
}
|