Add: config hub route

This commit is contained in:
Dreamacro
2018-06-20 22:41:02 +08:00
parent c2c8f82f96
commit 05ab653103
9 changed files with 115 additions and 4 deletions

View File

@ -11,8 +11,26 @@ const (
type RuleType int
func (rt RuleType) String() string {
switch rt {
case DomainSuffix:
return "DomainSuffix"
case DomainKeyword:
return "DomainKeyword"
case GEOIP:
return "GEOIP"
case IPCIDR:
return "IPCIDR"
case FINAL:
return "FINAL"
default:
return "Unknow"
}
}
type Rule interface {
RuleType() RuleType
IsMatch(addr *Addr) bool
Adapter() string
Payload() string
}