black_hole

package
v5.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PluginType = "black_hole"

Variables

This section is empty.

Functions

func QuickSetup

func QuickSetup(_ sequence.BQ, s string) (any, error)

QuickSetup format: [ipv4|ipv6] ... Support both ipv4/a and ipv6/aaaa families.

Types

type BlackHole

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

func NewBlackHole

func NewBlackHole(ips []string) (*BlackHole, error)

NewBlackHole creates a new BlackHole with given ips.

func (*BlackHole) Exec

func (b *BlackHole) Exec(_ context.Context, qCtx *query_context.Context) error

Exec implements sequence.Executable. It set a response with given ips if query has corresponding qtypes.

func (*BlackHole) Response

func (b *BlackHole) Response(q *dns.Msg) *dns.Msg

Response returns a response with given ips if query has corresponding qtypes. Otherwise, it returns nil.

Jump to

Keyboard shortcuts

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