Clash.Meta/rules/common/base.go
wwqgtxx 763a127287 feat: RULE-SET in rules support ,src option
should only be used with `ipcidr` behavior
2024-08-29 23:49:16 +08:00

35 lines
525 B
Go

package common
import (
"errors"
"golang.org/x/exp/slices"
)
var (
errPayload = errors.New("payloadRule error")
noResolve = "no-resolve"
src = "src"
)
type Base struct {
}
func (b *Base) ShouldFindProcess() bool {
return false
}
func (b *Base) ShouldResolveIP() bool {
return false
}
func (b *Base) ProviderNames() []string { return nil }
func HasNoResolve(params []string) bool {
return slices.Contains(params, noResolve)
}
func HasSrc(params []string) bool {
return slices.Contains(params, src)
}