Versions in this module Expand all Collapse all v1 v1.31.1 Nov 1, 2023 v1.31.0 Oct 20, 2023 Changes in this version + func HasNoResolve(params []string) bool + func ParseRule(tp, payload, target string, params []string) (C.Rule, error) + type Base struct + func (b *Base) AppendGroup(group string) + func (b *Base) RuleExtra() *C.RuleExtra + func (b *Base) RuleGroups() C.RuleGroup + func (b *Base) SetRuleExtra(re *C.RuleExtra) + func (b *Base) ShouldFindProcess() bool + func (b *Base) SubRules() []C.Rule + type Domain struct + func NewDomain(domain string, adapter string) *Domain + func (d *Domain) Adapter() string + func (d *Domain) Match(metadata *C.Metadata) bool + func (d *Domain) Payload() string + func (d *Domain) RuleType() C.RuleType + func (d *Domain) ShouldResolveIP() bool + type DomainKeyword struct + func NewDomainKeyword(keyword string, adapter string) *DomainKeyword + func (dk *DomainKeyword) Adapter() string + func (dk *DomainKeyword) Match(metadata *C.Metadata) bool + func (dk *DomainKeyword) Payload() string + func (dk *DomainKeyword) RuleType() C.RuleType + func (dk *DomainKeyword) ShouldResolveIP() bool + type DomainSuffix struct + func NewDomainSuffix(suffix string, adapter string) *DomainSuffix + func (ds *DomainSuffix) Adapter() string + func (ds *DomainSuffix) Match(metadata *C.Metadata) bool + func (ds *DomainSuffix) Payload() string + func (ds *DomainSuffix) RuleType() C.RuleType + func (ds *DomainSuffix) ShouldResolveIP() bool + type GEOIP struct + func NewGEOIP(country string, adapter string, noResolveIP bool) *GEOIP + func (g *GEOIP) Adapter() string + func (g *GEOIP) GetCountry() string + func (g *GEOIP) Match(metadata *C.Metadata) bool + func (g *GEOIP) Payload() string + func (g *GEOIP) RuleType() C.RuleType + func (g *GEOIP) ShouldResolveIP() bool + type GEOSITE struct + func NewGEOSITE(country string, adapter string) (*GEOSITE, error) + func (gs *GEOSITE) Adapter() string + func (gs *GEOSITE) GetDomainMatcher() *router.DomainMatcher + func (gs *GEOSITE) Match(metadata *C.Metadata) bool + func (gs *GEOSITE) Payload() string + func (gs *GEOSITE) RuleType() C.RuleType + func (gs *GEOSITE) ShouldResolveIP() bool + type Group struct + func NewGroup(payload string, matcher C.Matcher, rules []C.Rule) *Group + func (g *Group) Adapter() string + func (g *Group) Match(metadata *C.Metadata) bool + func (g *Group) Payload() string + func (g *Group) RuleExtra() *C.RuleExtra + func (g *Group) RuleType() C.RuleType + func (g *Group) ShouldResolveIP() bool + func (g *Group) SubRules() []C.Rule + type IPCIDR struct + func NewIPCIDR(s string, adapter string, opts ...IPCIDROption) (*IPCIDR, error) + func (i *IPCIDR) Adapter() string + func (i *IPCIDR) Match(metadata *C.Metadata) bool + func (i *IPCIDR) Payload() string + func (i *IPCIDR) RuleType() C.RuleType + func (i *IPCIDR) ShouldResolveIP() bool + type IPCIDROption func(*IPCIDR) + func WithIPCIDRNoResolve(noResolve bool) IPCIDROption + func WithIPCIDRSourceIP(b bool) IPCIDROption + type IPSet struct + func NewIPSet(name string, adapter string, noResolveIP bool) (*IPSet, error) + func (f *IPSet) Adapter() string + func (f *IPSet) Match(metadata *C.Metadata) bool + func (f *IPSet) Payload() string + func (f *IPSet) RuleType() C.RuleType + func (f *IPSet) ShouldResolveIP() bool + type Match struct + func NewMatch(adapter string) *Match + func (f *Match) Adapter() string + func (f *Match) Match(metadata *C.Metadata) bool + func (f *Match) Payload() string + func (f *Match) RuleType() C.RuleType + func (f *Match) ShouldResolveIP() bool + type Port struct + func NewPort(port string, adapter string, portType PortType) (*Port, error) + func (p *Port) Adapter() string + func (p *Port) Match(metadata *C.Metadata) bool + func (p *Port) Payload() string + func (p *Port) RuleType() C.RuleType + func (p *Port) ShouldResolveIP() bool + type PortType int + const PortTypeDest + const PortTypeInbound + const PortTypeSrc + type Process struct + func NewProcess(process string, adapter string, nameOnly bool) (*Process, error) + func (ps *Process) Adapter() string + func (ps *Process) Match(metadata *C.Metadata) bool + func (ps *Process) Payload() string + func (ps *Process) RuleType() C.RuleType + func (ps *Process) ShouldFindProcess() bool + func (ps *Process) ShouldResolveIP() bool + type Script struct + func NewScript(shortcut string, adapter string) (*Script, error) + func (s *Script) Adapter() string + func (s *Script) Match(metadata *C.Metadata) bool + func (s *Script) Payload() string + func (s *Script) RuleExtra() *C.RuleExtra + func (s *Script) RuleType() C.RuleType + func (s *Script) SetMatcher(m C.Matcher) + func (s *Script) ShouldResolveIP() bool + type UserAgent struct + func NewUserAgent(ua string, adapter string) (*UserAgent, error) + func (d *UserAgent) Adapter() string + func (d *UserAgent) Match(metadata *C.Metadata) bool + func (d *UserAgent) Payload() string + func (d *UserAgent) RuleType() C.RuleType + func (d *UserAgent) ShouldResolveIP() bool