rules

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasNoResolve added in v0.17.0

func HasNoResolve(params []string) bool

func ParseRule added in v1.0.0

func ParseRule(tp, payload, target string, params []string) (C.Rule, error)

Types

type Domain added in v0.7.0

type Domain struct {
	// contains filtered or unexported fields
}

func NewDomain added in v0.7.0

func NewDomain(domain string, adapter string) *Domain

func (*Domain) Adapter added in v0.7.0

func (d *Domain) Adapter() string

func (*Domain) Match added in v0.17.0

func (d *Domain) Match(metadata *C.Metadata) bool

func (*Domain) Payload added in v0.7.0

func (d *Domain) Payload() string

func (*Domain) RuleType added in v0.7.0

func (d *Domain) RuleType() C.RuleType

func (*Domain) ShouldResolveIP added in v1.1.0

func (d *Domain) ShouldResolveIP() bool

type DomainKeyword

type DomainKeyword struct {
	// contains filtered or unexported fields
}

func NewDomainKeyword

func NewDomainKeyword(keyword string, adapter string) *DomainKeyword

func (*DomainKeyword) Adapter

func (dk *DomainKeyword) Adapter() string

func (*DomainKeyword) Match added in v0.17.0

func (dk *DomainKeyword) Match(metadata *C.Metadata) bool

func (*DomainKeyword) Payload added in v0.5.0

func (dk *DomainKeyword) Payload() string

func (*DomainKeyword) RuleType

func (dk *DomainKeyword) RuleType() C.RuleType

func (*DomainKeyword) ShouldResolveIP added in v1.1.0

func (dk *DomainKeyword) ShouldResolveIP() bool

type DomainSuffix

type DomainSuffix struct {
	// contains filtered or unexported fields
}

func NewDomainSuffix

func NewDomainSuffix(suffix string, adapter string) *DomainSuffix

func (*DomainSuffix) Adapter

func (ds *DomainSuffix) Adapter() string

func (*DomainSuffix) Match added in v0.17.0

func (ds *DomainSuffix) Match(metadata *C.Metadata) bool

func (*DomainSuffix) Payload added in v0.5.0

func (ds *DomainSuffix) Payload() string

func (*DomainSuffix) RuleType

func (ds *DomainSuffix) RuleType() C.RuleType

func (*DomainSuffix) ShouldResolveIP added in v1.1.0

func (ds *DomainSuffix) ShouldResolveIP() bool

type GEOIP

type GEOIP struct {
	// contains filtered or unexported fields
}

func NewGEOIP

func NewGEOIP(country string, adapter string, noResolveIP bool) *GEOIP

func (*GEOIP) Adapter

func (g *GEOIP) Adapter() string

func (*GEOIP) Match added in v0.17.0

func (g *GEOIP) Match(metadata *C.Metadata) bool

func (*GEOIP) Payload added in v0.5.0

func (g *GEOIP) Payload() string

func (*GEOIP) RuleType

func (g *GEOIP) RuleType() C.RuleType

func (*GEOIP) ShouldResolveIP added in v1.1.0

func (g *GEOIP) ShouldResolveIP() bool

type IPCIDR

type IPCIDR struct {
	// contains filtered or unexported fields
}

func NewIPCIDR

func NewIPCIDR(s string, adapter string, opts ...IPCIDROption) (*IPCIDR, error)

func (*IPCIDR) Adapter

func (i *IPCIDR) Adapter() string

func (*IPCIDR) Match added in v0.17.0

func (i *IPCIDR) Match(metadata *C.Metadata) bool

func (*IPCIDR) Payload added in v0.5.0

func (i *IPCIDR) Payload() string

func (*IPCIDR) RuleType

func (i *IPCIDR) RuleType() C.RuleType

func (*IPCIDR) ShouldResolveIP added in v1.1.0

func (i *IPCIDR) ShouldResolveIP() bool

type IPCIDROption added in v0.17.0

type IPCIDROption func(*IPCIDR)

func WithIPCIDRNoResolve added in v0.17.0

func WithIPCIDRNoResolve(noResolve bool) IPCIDROption

func WithIPCIDRSourceIP added in v0.17.0

func WithIPCIDRSourceIP(b bool) IPCIDROption

type Match added in v0.13.0

type Match struct {
	// contains filtered or unexported fields
}

func NewMatch added in v0.13.0

func NewMatch(adapter string) *Match

func (*Match) Adapter added in v0.13.0

func (f *Match) Adapter() string

func (*Match) Match added in v0.17.0

func (f *Match) Match(metadata *C.Metadata) bool

func (*Match) Payload added in v0.13.0

func (f *Match) Payload() string

func (*Match) RuleType added in v0.13.0

func (f *Match) RuleType() C.RuleType

func (*Match) ShouldResolveIP added in v1.1.0

func (f *Match) ShouldResolveIP() bool

type Port added in v0.14.0

type Port struct {
	// contains filtered or unexported fields
}

func NewPort added in v0.14.0

func NewPort(port string, adapter string, isSource bool) (*Port, error)

func (*Port) Adapter added in v0.14.0

func (p *Port) Adapter() string

func (*Port) Match added in v0.17.0

func (p *Port) Match(metadata *C.Metadata) bool

func (*Port) Payload added in v0.14.0

func (p *Port) Payload() string

func (*Port) RuleType added in v0.14.0

func (p *Port) RuleType() C.RuleType

func (*Port) ShouldResolveIP added in v1.1.0

func (p *Port) ShouldResolveIP() bool

type Process added in v1.1.0

type Process struct {
	// contains filtered or unexported fields
}

func NewProcess added in v1.1.0

func NewProcess(process string, adapter string) (*Process, error)

func (*Process) Adapter added in v1.1.0

func (p *Process) Adapter() string

func (*Process) Match added in v1.1.0

func (ps *Process) Match(metadata *C.Metadata) bool

func (*Process) Payload added in v1.1.0

func (p *Process) Payload() string

func (*Process) RuleType added in v1.1.0

func (ps *Process) RuleType() C.RuleType

func (*Process) ShouldResolveIP added in v1.1.0

func (p *Process) ShouldResolveIP() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL