Clash.Meta/rules/common/base.go

33 lines
444 B
Go
Raw Normal View History

package common
import (
"errors"
)
var (
errPayload = errors.New("payloadRule error")
2022-05-30 21:26:41 +08:00
noResolve = "no-resolve"
)
2022-03-13 01:21:23 +08:00
type Base struct {
}
func (b *Base) ShouldFindProcess() bool {
return false
}
2022-03-17 23:24:07 +08:00
func (b *Base) ShouldResolveIP() bool {
return false
}
func (b *Base) ProviderNames() []string { return nil }
func HasNoResolve(params []string) bool {
for _, p := range params {
if p == noResolve {
return true
}
}
return false
}