dns_proxy

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FILTER_ACTION_UNSPECIFIC = iota
	FILTER_ACTION_BLOCK
	FILTER_ACTION_PASS
)
View Source
const (
	FILTER_BLACK = false
	FILTER_WHITE = true
)

Variables

This section is empty.

Functions

func LoadFilter

func LoadFilter(blackList []string, whiteList []string) (ret *dnsFilter, err error)

Types

type DnsServer

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

func StartDnsServer

func StartDnsServer(dnsConfig config.DnsConfig, pacMgr *pac.PacListMgr, routingMgr *routing.RoutingMgr, proxyClient common.ProxyClientInterface) (ret *DnsServer, err error)

func (*DnsServer) AddDnsCache

func (c *DnsServer) AddDnsCache(domain string, response *dns.Msg, ttl uint32)

func (*DnsServer) Reload

func (c *DnsServer) Reload(dnsConfig config.DnsConfig)

func (*DnsServer) ServeDNS

func (c *DnsServer) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

func (*DnsServer) ServerDNSPacket

func (c *DnsServer) ServerDNSPacket(msg *dns.Msg) ([]byte, error)

func (*DnsServer) Stop

func (c *DnsServer) Stop()

Jump to

Keyboard shortcuts

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