mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 21:51:23 +08:00
9b89ff9f2d
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
|
|
}
|