coreadblock

package module
v0.0.0-...-6906fdb Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

README

coreadblock

Build Status

A CoreDNS plugin to block ads

Documentation

Index

Constants

View Source
const (
	PLUGIN_NAME = "coreadblock"
	BLOOM_SIZE  = 50000 * 20
	HASH_SIZE   = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreAdBlock

type CoreAdBlock struct {
	Next       plugin.Handler
	Urls       []string
	ResolveIP  string
	Exceptions map[string]bool
	BlockList  *sync.Map
	Bloom      *bloom.BloomFilter
	// contains filtered or unexported fields
}

func (*CoreAdBlock) LoadRules

func (c *CoreAdBlock) LoadRules() error

func (*CoreAdBlock) Name

func (c *CoreAdBlock) Name() string

func (*CoreAdBlock) Ready

func (c *CoreAdBlock) Ready() bool

func (*CoreAdBlock) ServeDNS

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

Jump to

Keyboard shortcuts

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