Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BlockCount = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: plugin.Namespace, Subsystem: pluginName, Name: "blocked_requests_total", Help: "Counter of blocked requests.", }, []string{"server"}) )
Functions ¶
This section is empty.
Types ¶
type Filter ¶
Filter represents a plugin instance that can filter and block requests based on predefined lists and regex rules.
type PatternMatcher ¶
type PatternMatcher struct {
// contains filtered or unexported fields
}
func NewPatternMatcher ¶
func NewPatternMatcher() *PatternMatcher
func (*PatternMatcher) Add ¶
func (f *PatternMatcher) Add(pattern string) error
func (*PatternMatcher) Match ¶
func (f *PatternMatcher) Match(qname string) bool
type ResponseWriter ¶
type ResponseWriter struct { dns.ResponseWriter *Filter // contains filtered or unexported fields }
ResponseWriter is a response writer that performs response uncloaking.
Click to show internal directories.
Click to hide internal directories.