[Refactor]

1.allow maybe empty group
2.use COMPATIBLE(DIRECT alias) when proxy group is empty
3.http provider pass through tunnel
This commit is contained in:
Skyxim
2022-01-18 21:09:36 +08:00
parent ee6c1871a9
commit b15344ec78
17 changed files with 135 additions and 50 deletions

View File

@ -75,6 +75,10 @@ func (rp *ruleSetProvider) Behavior() P.RuleType {
}
func (rp *ruleSetProvider) Match(metadata *C.Metadata) bool {
if rp.count == 0 {
return false
}
switch rp.behavior {
case P.Domain:
return rp.DomainRules.Search(metadata.Host) != nil