1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-04 21:15:24 +00:00
v2fly/app/router/rules/testing/rule.go
2015-12-07 22:47:47 +01:00

19 lines
310 B
Go

package testing
import (
v2net "github.com/v2ray/v2ray-core/common/net"
)
type TestRule struct {
Function func(v2net.Destination) bool
TagValue string
}
func (this *TestRule) Apply(dest v2net.Destination) bool {
return this.Function(dest)
}
func (this *TestRule) Tag() string {
return this.TagValue
}