proxy

package
v0.0.0-...-13cb165 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ListenAddress           HostAndPort            `json:"listenAddress"`
	RemoteHTTPURL           string                 `json:"remoteHTTPURL"`
	ForwardDomain           string                 `json:"forwardDomain"`
	ForwardNamesToAddresses []ForwardNameToAddress `json:"forwardNamesToAddresses"`
	ReverseDomain           string                 `json:"reverseDomain"`
	ReverseAddressesToNames []ReverseAddressToName `json:"reverseAddressesToNames"`
	MinTTLSeconds           uint32                 `json:"minTTLSeconds"`
	MaxTTLSeconds           uint32                 `json:"maxTTLSeconds"`
	MaxCacheSize            int                    `json:"maxCacheSize"`
	TimerIntervalSeconds    int                    `json:"timerIntervalSeconds"`
	MaxPurgesPerTimerPop    int                    `json:"maxPurgesPerTimerPop"`
}

Configuration is the DNS proxy configuration.

func ReadConfiguration

func ReadConfiguration(configFile string) (*Configuration, error)

ReadConfiguration reads the DNS proxy configuration from a json file.

type DNSProxy

type DNSProxy interface {
	Start()
}

DNSProxy is the DNS proxy.

func NewDNSProxy

func NewDNSProxy(configuration *Configuration) DNSProxy

NewDNSProxy creates a DNS proxy.

type ForwardNameToAddress

type ForwardNameToAddress struct {
	Name      string `json:"name"`
	IPAddress string `json:"ipAddress"`
}

ForwardNameToAddress is a forward name to IP address mapping.

type HostAndPort

type HostAndPort struct {
	Host string `json:"host"`
	Port string `json:"port"`
}

HostAndPort is a host and port.

type ReverseAddressToName

type ReverseAddressToName struct {
	ReverseAddress string `json:"reverseAddress"`
	Name           string `json:"name"`
}

ReverseAddressToName is a reverse address to name mapping.

Jump to

Keyboard shortcuts

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