dns

package
v0.0.0-...-f2271ba Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server defines NetTrust DNS Server proxy. The server invokes firewall calls also

func NewDNSServer

func NewDNSServer(
	laddr, faddr, fwdProto, listenCert, ListenCertKey, clientCaCert string,
	listenTLS, fwdTLS bool,
	dnsTTLCache int,
	clientUDPBufferSize uint16,
	domainBlacklist []string,
	logger *logrus.Logger,
) (*Server, error)

NewDNSServer for creating a new NetTrust DNS Server proxy

func (*Server) TCPListenBackground

func (s *Server) TCPListenBackground(fn func(resp *dns.Msg) error) *ServiceContext

TCPListenBackground for spawning a tcp DNS Server

func (*Server) UDPListenBackground

func (s *Server) UDPListenBackground(fn func(resp *dns.Msg) error) *ServiceContext

UDPListenBackground for spawning a udp DNS Server

type ServiceContext

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

ServiceContext for canceling goroutins

func (*ServiceContext) Expire

func (f *ServiceContext) Expire()

Expire will call cancel to terminate a context immediately, causing the goroutine to exit

func (*ServiceContext) Wait

func (f *ServiceContext) Wait()

Wait ensures that the goroutine has exit successfully

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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