domain

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 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 added in v1.5.7

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

func NewDomainListMatcherFormReader added in v1.5.7

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

func NewDomainMatcherFormFile added in v1.5.7

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 added in v1.5.7

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

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