domain

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListMatcher

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

func NewListMatcher

func NewListMatcher() *ListMatcher

func (*ListMatcher) Add

func (l *ListMatcher) Add(fqdn string)

func (*ListMatcher) Len

func (l *ListMatcher) Len() int

func (*ListMatcher) Match

func (l *ListMatcher) Match(fqdn string) bool

type Matcher

type Matcher interface {
	Match(fqdn string) bool
}

func NewDomainListMatcherFormFile

func NewDomainListMatcherFormFile(file string, continueOnInvalidString bool) (Matcher, error)

func NewDomainListMatcherFormReader

func NewDomainListMatcherFormReader(r io.Reader, continueOnInvalidString bool) (Matcher, error)

func NewDomainMatcherFormFile

func NewDomainMatcherFormFile(file string) (Matcher, error)

NewDomainMatcherFormFile loads a list matcher or a v2fly matcher from file. if file has a ':' and has format like 'geosite:cn', a v2fly matcher will be returned.

func NewV2MatcherFromFile

func NewV2MatcherFromFile(file, tag string) (Matcher, error)

type MatcherGroup

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

func NewMatcherGroup

func NewMatcherGroup(m []Matcher) *MatcherGroup

func (*MatcherGroup) Match

func (mg *MatcherGroup) Match(fqdn string) bool

type V2Matcher

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

func NewV2Matcher

func NewV2Matcher(domains []*router.Domain) (*V2Matcher, error)

func (*V2Matcher) Match

func (m *V2Matcher) Match(fqdn string) bool

Jump to

Keyboard shortcuts

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