resolver

package
v0.0.0-...-6c44b69 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package resolver contains the DNS resolver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CensoringResolver

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

CensoringResolver is a censoring resolver.

func NewCensoringResolver

func NewCensoringResolver(
	blocked, hijacked, ignored []string, uncensored httptransport.Resolver,
) *CensoringResolver

NewCensoringResolver creates a new CensoringResolver instance using the specified list of keywords to censor. blocked is the list of keywords that trigger NXDOMAIN if they appear in a query. hijacked is similar but redirects to 127.0.0.1, where the transparent HTTP and TLS proxies will pick them up. dnsNetwork and dnsAddress are the settings to configure the upstream, non censored DNS.

func (*CensoringResolver) ServeDNS

func (r *CensoringResolver) ServeDNS(rw dns.ResponseWriter, req *dns.Msg)

ServeDNS serves a DNS request

func (*CensoringResolver) Start

func (r *CensoringResolver) Start(address string) (*dns.Server, error)

Start starts the DNS resolver

Jump to

Keyboard shortcuts

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