blocker

package module
v0.0.0-...-53e5e69 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 15 Imported by: 0

README

blocker

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGeoIPMatcher

func NewGeoIPMatcher(ips []string) []*matcher.CIDR

Types

type Blocker

type Blocker struct {
	Next plugin.Handler
	// contains filtered or unexported fields
}

func New

func New(mhs []matcher.Matcher) *Blocker

func (*Blocker) Name

func (c *Blocker) Name() string

func (*Blocker) ServeDNS

func (c *Blocker) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

type Matchers

type Matchers []matcher.Matcher

func NewMatchers

func NewMatchers(args []string) (Matchers, error)

func (*Matchers) Unmarshal

func (c *Matchers) Unmarshal(str []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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