Documentation
¶
Overview ¶
Package spfmacro is a CoreDNS plugin that allows to serve spf macros.
Index ¶
Constants ¶
const DnsLookupAddr = "9.9.9.9:53"
Variables ¶
var CIDRPattern = regexp.MustCompile(`(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/?\d{0,2})`)
var DomainPattern = regexp.MustCompile(`((txt|a|include):[((www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))`)
var IPWithDomainPattern = regexp.MustCompile(`(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\.([((www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))\._`)
var IPPattern = regexp.MustCompile(`(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})`)
Functions ¶
func CheckDomainValidity ¶
Types ¶
type ResponsePrinter ¶
type ResponsePrinter struct {
dns.ResponseWriter
}
ResponsePrinter wrap a dns.ResponseWriter and will write example to standard output when WriteMsg is called.
func NewResponsePrinter ¶
func NewResponsePrinter(w dns.ResponseWriter) *ResponsePrinter
NewResponsePrinter returns ResponseWriter.
type SPFEntry ¶
func ParseSPFEntry ¶
type SPFMacro ¶
type SPFMacro struct { Next plugin.Handler Domains []string Subnets []net.IPNet M sync.RWMutex L *rate.Limiter }
SPFMacro is a plugin to serve SPF Macro compatible DNS
func (*SPFMacro) CreateAcceptSPFRecord ¶
func (*SPFMacro) Ready ¶
Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.
func (*SPFMacro) ServeDNS ¶
ServeDNS implements the plugin.Handler interface. This method gets called when spfmacro is used in a Server.