Documentation ¶
Index ¶
- type AppOptions
- type DebugOptions
- type GudgeonConfig
- func (config *GudgeonConfig) CacheRoot() string
- func (config *GudgeonConfig) DataRoot() string
- func (config *GudgeonConfig) GetConsumer(name string) *GudgeonConsumer
- func (config *GudgeonConfig) GetGroup(name string) *GudgeonGroup
- func (config *GudgeonConfig) GetList(name string) *GudgeonList
- func (config *GudgeonConfig) GetResolver(name string) *GudgeonResolver
- func (config *GudgeonConfig) PathToList(list *GudgeonList) string
- func (config *GudgeonConfig) SessionRoot() string
- type GudgeonConsumer
- type GudgeonDatabase
- type GudgeonGroup
- type GudgeonInterface
- type GudgeonList
- type GudgeonMatch
- type GudgeonMatchRange
- type GudgeonMetrics
- type GudgeonNetwork
- type GudgeonOptions
- type GudgeonQueryLog
- type GudgeonResolver
- type GudgeonRoot
- type GudgeonStorage
- type GudgeonTLS
- type GudgeonWeb
- 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."`
}
type DebugOptions ¶ added in v0.3.16
type DebugOptions struct {
Profile bool `short:"P" long:"profile" description:"Enable GOPS profiling at runtime."`
}
type GudgeonConfig ¶
type GudgeonConfig struct { Home string `yaml:"home"` Storage *GudgeonStorage `yaml:"storage"` Database *GudgeonDatabase `yaml:"database"` 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 []*GudgeonConsumer `yaml:"consumers"` // contains filtered or unexported fields }
func (*GudgeonConfig) CacheRoot ¶
func (config *GudgeonConfig) CacheRoot() string
func (*GudgeonConfig) DataRoot ¶ added in v0.3.0
func (config *GudgeonConfig) DataRoot() string
func (*GudgeonConfig) GetConsumer ¶ added in v0.3.14
func (config *GudgeonConfig) GetConsumer(name string) *GudgeonConsumer
func (*GudgeonConfig) GetGroup ¶ added in v0.3.14
func (config *GudgeonConfig) GetGroup(name string) *GudgeonGroup
func (*GudgeonConfig) GetList ¶ added in v0.3.14
func (config *GudgeonConfig) GetList(name string) *GudgeonList
func (*GudgeonConfig) GetResolver ¶ added in v0.3.14
func (config *GudgeonConfig) GetResolver(name string) *GudgeonResolver
func (*GudgeonConfig) PathToList ¶
func (config *GudgeonConfig) PathToList(list *GudgeonList) string
func (*GudgeonConfig) SessionRoot ¶
func (config *GudgeonConfig) SessionRoot() string
type GudgeonConsumer ¶ added in v0.3.14
type GudgeonConsumer struct { Name string `yaml:"name"` Block bool `yaml:"block"` Groups []string `yaml:"groups"` Matches []*GudgeonMatch `yaml:"matches"` }
type GudgeonDatabase ¶ added in v0.6.1
type GudgeonDatabase struct {
Flush string `yaml:"flush"`
}
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.
func (*GudgeonGroup) SafeTags ¶ added in v0.3.14
func (list *GudgeonGroup) SafeTags() []string
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) SafeTags ¶ added in v0.3.14
func (list *GudgeonList) SafeTags() []string
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 GudgeonMetrics struct { // controls if the entire feature is enabled/disabled Enabled *bool `yaml:"enabled"` // enables metrics persisting to the db Persist *bool `yaml:"persist"` // enables detailed stats per client, domain, etc Detailed *bool `yaml:"detailed"` // how long to keep records Duration string `yaml:"duration"` // how often to record metrics Interval string `yaml:"interval"` }
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"` // debug/performance/profiling options DebugOptions DebugOptions `group:"Debugging/Profiling 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 GudgeonQueryLog struct { // controls if the entire feature is enabled/disabled Enabled *bool `yaml:"enabled"` // enables persisting queries to the log (to make them searchable) Persist *bool `yaml:"persist"` // how long to keep the queries for Duration string `yaml:"duration"` // if we should also log to stdout Stdout *bool `yaml:"stdout"` // if we should log to a file, the path to that file (does not rotate automatically) File string `yaml:"file"` // reverse lookup using query engine ReverseLookup *bool `yaml:"lookup"` // add mdns/zeroconf/bonjour capability to lookup MdnsLookup *bool `yaml:"mdns"` // add netbios capability to lookup NetbiosLookup *bool `yaml:"netbios"` }
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 GudgeonStorage ¶ added in v0.3.13
type GudgeonStorage struct { // rule storage is used by the rule storage engine to decide which implementation to use // values are like 'memory', 'sqlite', 'hash32', etc RuleStorage string `yaml:"rules"` // you can enable/disable the cache here, default is to enable CacheEnabled *bool `yaml:"cache"` }
GudgeonStorage defines the different storage types for persistent/session data
type GudgeonTLS ¶ added in v0.1.7
type GudgeonTLS struct {
Enabled bool `yaml:"enabled"`
}
type GudgeonWeb ¶ added in v0.2.2
type HelpOptions ¶
Click to show internal directories.
Click to hide internal directories.