accessmw

package
v0.0.0-...-b6e3791 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package accessmw contains the access middleware of the AdGuard DNS server. It filters out the domain scanners and other requests by specified AdBlock rules and IP subnets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccessManager access.Interface
}

Config is the configuration structure for the access middleware. All fields must be non-nil.

type Middleware

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

Middleware is the access middleware of the AdGuard DNS server.

func New

func New(c *Config) (mw *Middleware)

New returns a new access middleware. c must not be nil.

func (*Middleware) Wrap

func (mw *Middleware) Wrap(next dnsserver.Handler) (wrapped dnsserver.Handler)

Wrap implements the dnsserver.Middleware interface for *Middleware

Jump to

Keyboard shortcuts

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