domain_matcher

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidDomainChars = trie.NewValidChars([]byte("0123456789abcdefghijklmnopqrstuvwxyz-.^_"))

Functions

func ToSuffixTrieString

func ToSuffixTrieString(s string) string

func ToSuffixTrieStrings

func ToSuffixTrieStrings(s []string) []string

Types

type AhocorasickSlimtrie

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

func NewAhocorasickSlimtrie

func NewAhocorasickSlimtrie(log *logrus.Logger, bitLength int) *AhocorasickSlimtrie

func (*AhocorasickSlimtrie) AddSet

func (n *AhocorasickSlimtrie) AddSet(bitIndex int, patterns []string, typ consts.RoutingDomainKey)

func (*AhocorasickSlimtrie) Build

func (n *AhocorasickSlimtrie) Build() (err error)

func (*AhocorasickSlimtrie) MatchDomainBitmap

func (n *AhocorasickSlimtrie) MatchDomainBitmap(domain string) (bitmap []uint32)

type Bruteforce

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

func NewBruteforce

func NewBruteforce(bitLength int) *Bruteforce

func (*Bruteforce) AddSet

func (n *Bruteforce) AddSet(bitIndex int, patterns []string, typ consts.RoutingDomainKey)

func (*Bruteforce) Build

func (n *Bruteforce) Build() error

func (*Bruteforce) MatchDomainBitmap

func (n *Bruteforce) MatchDomainBitmap(domain string) (bitmap []uint32)

type GoRegexpNfa

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

func NewGoRegexpNfa

func NewGoRegexpNfa(bitLength int) *GoRegexpNfa

func (*GoRegexpNfa) AddSet

func (n *GoRegexpNfa) AddSet(bitIndex int, patterns []string, typ consts.RoutingDomainKey)

func (*GoRegexpNfa) Build

func (n *GoRegexpNfa) Build() error

func (*GoRegexpNfa) MatchDomainBitmap

func (n *GoRegexpNfa) MatchDomainBitmap(domain string) (bitmap []uint32)

Jump to

Keyboard shortcuts

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