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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址