Documentation ¶
Index ¶
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"` Network *GudgeonNetwork `yaml:"network"` 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) 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"` }
interface
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
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 GudgeonNetwork ¶
type GudgeonNetwork struct { // 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"` // endpoints: list of string endpoints that should have dns Interfaces []*GudgeonInterface `yaml:"interfaces"` }
network: general dns network configuration
type GudgeonOptions ¶
type GudgeonOptions struct { // explict 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 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"` }
type GudgeonRoot ¶
type GudgeonRoot struct {
Config *GudgeonConfig `yaml:"gudgeon"`
}
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.