mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
d6dc5ba19c
rules: - SUB-RULE,(AND,((NETWORK,TCP),(DOMAIN-KEYWORD,google))),TEST2 - SUB-RULE,(GEOIP,!CN),TEST1 - MATCH,DIRECT sub-rules: TEST2: - MATCH,Proxy TEST1: - RULE-SET,Local,DIRECT,no-resolve - GEOSITE,CN,Domestic - GEOIP,CN,Domestic - MATCH,Proxy
32 lines
405 B
Go
32 lines
405 B
Go
package common
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
errPayload = errors.New("payloadRule error")
|
|
initFlag bool
|
|
noResolve = "no-resolve"
|
|
)
|
|
|
|
type Base struct {
|
|
}
|
|
|
|
func (b *Base) ShouldFindProcess() bool {
|
|
return false
|
|
}
|
|
|
|
func (b *Base) ShouldResolveIP() bool {
|
|
return false
|
|
}
|
|
|
|
func HasNoResolve(params []string) bool {
|
|
for _, p := range params {
|
|
if p == noResolve {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|