Documentation ¶
Index ¶
- type AppOptions
- type GudgeonConfig
- type GudgeonGroup
- type GudgeonInterface
- type GudgeonList
- type GudgeonMatch
- type GudgeonMatchRange
- type GudgeonMetrics
- type GudgeonNetwork
- type GudgeonOptions
- type GudgeonQueryLog
- type GudgeonResolver
- type GudgeonRoot
- type GudgeonTLS
- type GudgeonWeb
- type GundgeonConsumer
- type HelpOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppOptions ¶
type AppOptions struct {
ConfigPath flags.Filename `short:"c" long:"config" description:"Path to Gudgeon configuration file." default:"./gudgeon.yml"`
}
type GudgeonConfig ¶
type GudgeonConfig struct { Home string `yaml:"home"` Metrics *GudgeonMetrics `yaml:"metrics"` QueryLog *GudgeonQueryLog `yaml:"query_log"` Network *GudgeonNetwork `yaml:"network"` Web *GudgeonWeb `yaml:"web"` Resolvers []*GudgeonResolver `yaml:"resolvers"` Lists []*GudgeonList `yaml:"lists"` Groups []*GudgeonGroup `yaml:"groups"` Consumers []*GundgeonConsumer `yaml:"consumers"` }
func Load ¶
func Load(filename string) (*GudgeonConfig, error)
func (*GudgeonConfig) CacheRoot ¶
func (config *GudgeonConfig) CacheRoot() string
func (*GudgeonConfig) DataRoot ¶ added in v0.3.0
func (config *GudgeonConfig) DataRoot() string
func (*GudgeonConfig) PathToList ¶
func (config *GudgeonConfig) PathToList(list *GudgeonList) string
func (*GudgeonConfig) SessionRoot ¶
func (config *GudgeonConfig) SessionRoot() string
type GudgeonGroup ¶
type GudgeonGroup struct { // name: name of the group Name string `yaml:"name"` // inherit: list of groups to copy settings from Inherit []string `yaml:"inherit"` // resolvers: resolvers to use for this group Resolvers []string `yaml:"resolvers"` // lists: names of blocklists to apply Lists []string `yaml:"lists"` // tags: tags to use for tag-based matching Tags []string `yaml:"tags"` }
groups: ties end-users (consumers) to various lists.
type GudgeonInterface ¶
type GudgeonInterface struct { // the IP of the interface. The interface 0.0.0.0 means "all" IP string `yaml:"ip"` // The port to listen on (on the given interface), defaults to 53 Port int `yaml:"port"` // Should this port listen on TCP? (defaults to the value of Network.TCP which defaults to true) TCP *bool `yaml:"tcp"` // Should this port listen on UDP? (defaults to the value of Network.UDP which defaults to true) UDP *bool `yaml:"udp"` // TLS settings TLS *GudgeonTLS `yaml:"tls"` }
network interface information
type GudgeonList ¶
type GudgeonList struct { // the name of the list Name string `yaml:"name"` // the type of the list, requires "allow" or "block", defaults to "block" Type string `yaml:"type"` // the tags that relate to the list for tag filtering/processing Tags []string `yaml:"tags"` // the path to the list, remote paths will be downloaded if possible Source string `yaml:"src"` }
blocklists, blacklists, whitelists: different types of lists for domains that gudgeon will evaluate
func (*GudgeonList) CanonicalName ¶
func (list *GudgeonList) CanonicalName() string
simple function to get source as name if name is missing
func (*GudgeonList) IsRemote ¶
func (list *GudgeonList) IsRemote() bool
func (*GudgeonList) ShortName ¶ added in v0.2.2
func (list *GudgeonList) ShortName() string
type GudgeonMatch ¶
type GudgeonMatch struct { IP string `yaml:"ip"` Range *GudgeonMatchRange `yaml:"range"` Net string `yaml:"net"` }
type GudgeonMatchRange ¶
range: an IP range for consumer matching
type GudgeonMetrics ¶ added in v0.3.0
type GudgeonNetwork ¶
type GudgeonNetwork struct { // Global TLS settings TLS *GudgeonTLS `yaml:"tls"` // tcp: true when the default for all interfaces is to use tcp TCP *bool `yaml:"tcp"` // udp: true when the default for all interfaces is to use udp UDP *bool `yaml:"udp"` // systemd: also accept listeners request from systemd Systemd *bool `yaml:"systemd"` // endpoints: list of string endpoints that should have dns Interfaces []*GudgeonInterface `yaml:"interfaces"` }
network: general dns network configuration
type GudgeonOptions ¶
type GudgeonOptions struct { // explicit app group AppOptions AppOptions `group:"Application Options"` // emulate help flag with direct support for accessing it HelpOptions HelpOptions `group:"Help Options"` }
func Options ¶
func Options(longVersion string) (GudgeonOptions, error)
type GudgeonQueryLog ¶ added in v0.3.0
type GudgeonResolver ¶
type GudgeonResolver struct { // name of the resolver Name string `yaml:"name"` // domains to operate on Domains []string `yaml:"domains"` // domains to skip SkipDomains []string `yaml:"skip"` // search domains, will retry resolution using these subdomains if the domain is not found Search []string `yaml:"search"` // manual hosts Hosts []string `yaml:"hosts"` // sources (described via string) Sources []string `yaml:"sources"` }
a resolver is composed of a list of sources to get DNS information from
type GudgeonRoot ¶
type GudgeonRoot struct {
Config *GudgeonConfig `yaml:"gudgeon"`
}
type GudgeonTLS ¶ added in v0.1.7
type GudgeonTLS struct {
Enabled bool `yaml:"enabled"`
}
type GudgeonWeb ¶ added in v0.2.2
type GundgeonConsumer ¶
type GundgeonConsumer struct { Name string `yaml:"name"` Groups []string `yaml:"groups"` Matches []*GudgeonMatch `yaml:"matches"` }
type HelpOptions ¶
Click to show internal directories.
Click to hide internal directories.