Documentation ¶
Index ¶
- Variables
- func ConvertMain(args []string)
- func ConvertToMrs(buf []byte, behavior P.RuleBehavior, format P.RuleFormat, w io.Writer) (err error)
- func NewClassicalStrategy(...) *classicalStrategy
- func NewDomainStrategy() *domainStrategy
- func NewIPCidrStrategy() *ipcidrStrategy
- func NewRuleSetProvider(name string, behavior P.RuleBehavior, format P.RuleFormat, ...) P.RuleProvider
- func ParseRuleProvider(name string, mapping map[string]interface{}, ...) (P.RuleProvider, error)
- func SetTunnel(t P.Tunnel)
- type RulePayload
- type RuleSet
- func (rs *RuleSet) Adapter() string
- func (rs *RuleSet) Match(metadata *C.Metadata) (bool, string)
- func (rs *RuleSet) MatchDomain(domain string) bool
- func (rs *RuleSet) MatchIp(ip netip.Addr) bool
- func (rs *RuleSet) Payload() string
- func (rs *RuleSet) ProviderNames() []string
- func (rs *RuleSet) RuleType() C.RuleType
- func (rs *RuleSet) ShouldFindProcess() bool
- func (rs *RuleSet) ShouldResolveIP() bool
- type RuleSetProvider
- func (rp RuleSetProvider) Behavior() P.RuleBehavior
- func (rp *RuleSetProvider) Close() error
- func (rp RuleSetProvider) Count() int
- func (rp RuleSetProvider) Initial() error
- func (rp RuleSetProvider) MarshalJSON() ([]byte, error)
- func (rp RuleSetProvider) Match(metadata *C.Metadata) bool
- func (rp RuleSetProvider) ShouldFindProcess() bool
- func (rp RuleSetProvider) ShouldResolveIP() bool
- func (rp RuleSetProvider) Strategy() any
- func (rp RuleSetProvider) Type() P.ProviderType
- func (rp RuleSetProvider) Update() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFormat = errors.New("invalid format")
View Source
var ErrNoPayload = errors.New("file must have a `payload` field")
View Source
var MrsMagicBytes = [4]byte{'M', 'R', 'S', 1} // MRSv1
Functions ¶
func ConvertMain ¶ added in v1.18.7
func ConvertMain(args []string)
func ConvertToMrs ¶ added in v1.18.7
func ConvertToMrs(buf []byte, behavior P.RuleBehavior, format P.RuleFormat, w io.Writer) (err error)
func NewClassicalStrategy ¶
func NewDomainStrategy ¶
func NewDomainStrategy() *domainStrategy
func NewIPCidrStrategy ¶
func NewIPCidrStrategy() *ipcidrStrategy
func NewRuleSetProvider ¶
func ParseRuleProvider ¶
Types ¶
type RulePayload ¶
type RuleSet ¶
func NewRuleSet ¶
func (*RuleSet) MatchDomain ¶ added in v1.18.8
MatchDomain implements C.DomainMatcher
func (*RuleSet) ProviderNames ¶ added in v1.18.6
func (*RuleSet) ShouldFindProcess ¶
func (*RuleSet) ShouldResolveIP ¶
type RuleSetProvider ¶
type RuleSetProvider struct {
// contains filtered or unexported fields
}
func (RuleSetProvider) Behavior ¶
func (rp RuleSetProvider) Behavior() P.RuleBehavior
func (*RuleSetProvider) Close ¶ added in v1.18.8
func (rp *RuleSetProvider) Close() error
func (RuleSetProvider) MarshalJSON ¶
func (RuleSetProvider) ShouldFindProcess ¶
func (rp RuleSetProvider) ShouldFindProcess() bool
func (RuleSetProvider) ShouldResolveIP ¶
func (rp RuleSetProvider) ShouldResolveIP() bool
func (RuleSetProvider) Type ¶
func (rp RuleSetProvider) Type() P.ProviderType
Click to show internal directories.
Click to hide internal directories.