Documentation ¶
Overview ¶
Package xlisthole implements a CoreDNS plugin that integrates with luIDS xlist.Check api and adds sinkhole functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionInfo ¶
type ActionInfo struct { Type ActionType Data string }
ActionInfo stores dns action information.
func ToActionInfo ¶
func ToActionInfo(s string) (ActionInfo, error)
ToActionInfo returns an action from string.
type ActionType ¶
type ActionType int
ActionType defines actions for the rules.
const ( SendNXDomain ActionType = iota SendFixedIP4 SendRefused ReturnValue CheckIP CheckCNAME CheckAll )
ActionType values.
func (ActionType) String ¶
func (a ActionType) String() string
type Config ¶
Config stores configuration for the plugin.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with default values.
type EventInfo ¶
EventInfo stores event information in rules.
func ToEventInfo ¶
ToEventInfo returns event information from string.
type IPSet ¶
IPSet contains ips and cidrs.
type Plugin ¶
Plugin is the main struct of the plugin.
func (*Plugin) RegisterMetrics ¶
func (p *Plugin) RegisterMetrics(c *caddy.Controller)
RegisterMetrics register metrics in controller.
type Rule ¶
type Rule struct { Action ActionInfo Event EventInfo Log bool }
Rule stores rule information.
type RuleSet ¶
type RuleSet struct { Domain Rules IP Rules CNAME Rules OnError ActionInfo }
RuleSet stores the policy items.