parent
65458b2de2
commit
bf356e79fc
7 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
## CoreDNS
|
||||
|
||||
*coredns* - plugable DNS nameserver optimized for service discovery and flexibility.
|
||||
*coredns* - pluggable DNS nameserver optimized for service discovery and flexibility.
|
||||
|
||||
## Synopsis
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
## Description
|
||||
|
||||
With `acl` enabled, users are able to block suspicous DNS queries by configuring IP filter rule sets, i.e. allowing authorized queries to recurse or blocking unauthorized queries.
|
||||
With `acl` enabled, users are able to block suspicious DNS queries by configuring IP filter rule sets, i.e. allowing authorized queries to recurse or blocking unauthorized queries.
|
||||
|
||||
This plugin can be used multiple times per Server Block.
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ RulesCheckLoop:
|
|||
}
|
||||
|
||||
// matchWithPolicies matches the DNS query with a list of ACL polices and returns suitable
|
||||
// action agains the query.
|
||||
// action against the query.
|
||||
func matchWithPolicies(policies []policy, w dns.ResponseWriter, r *dns.Msg) action {
|
||||
state := request.Request{W: w, Req: r}
|
||||
|
||||
|
|
|
@ -118,14 +118,14 @@ func (t *Transport) cleanup(all bool) {
|
|||
}
|
||||
}
|
||||
|
||||
// It is hard to pin a value to this, the import thing is to no block forever, loosing at cached connection is not terrible.
|
||||
// It is hard to pin a value to this, the import thing is to no block forever, losing at cached connection is not terrible.
|
||||
const yieldTimeout = 25 * time.Millisecond
|
||||
|
||||
// Yield return the connection to transport for reuse.
|
||||
func (t *Transport) Yield(pc *persistConn) {
|
||||
pc.used = time.Now() // update used time
|
||||
|
||||
// Make ths non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This
|
||||
// Make this non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This
|
||||
// blocks the outer go-routine and stuff will just pile up. We timeout when the send fails to as returning
|
||||
// these connection is an optimization anyway.
|
||||
select {
|
||||
|
|
|
@ -193,7 +193,7 @@ func maybeUnescape(s string) (string, error) {
|
|||
case r >= rune('0') && r <= rune('9'):
|
||||
case r == rune('*'):
|
||||
if out != "" {
|
||||
return "", errors.New("`*' ony supported as wildcard (leftmost label)")
|
||||
return "", errors.New("`*' only supported as wildcard (leftmost label)")
|
||||
}
|
||||
case r == rune('-'):
|
||||
case r == rune('.'):
|
||||
|
|
|
@ -285,7 +285,7 @@ func TestMaybeUnescape(t *testing.T) {
|
|||
// 3. Escaped dot, 'a' and a hyphen. No idea why but we'll allow it.
|
||||
{escaped: `weird\\055ex\\141mple\\056com\\056\\056`, want: "weird-example.com.."},
|
||||
// 4. escaped `*` in the middle - NOT OK.
|
||||
{escaped: `e\\052ample.com`, wantErr: errors.New("`*' ony supported as wildcard (leftmost label)")},
|
||||
{escaped: `e\\052ample.com`, wantErr: errors.New("`*' only supported as wildcard (leftmost label)")},
|
||||
// 5. Invalid character.
|
||||
{escaped: `\\000.example.com`, wantErr: errors.New(`invalid character: \\000`)},
|
||||
// 6. Invalid escape sequence in the middle.
|
||||
|
|
|
@ -31,7 +31,7 @@ const (
|
|||
DurationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days
|
||||
DurationRefreshHours = 5 * time.Hour // check zones every 5 hours
|
||||
DurationJitter = -18 * time.Hour // default max jitter
|
||||
DurationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is substracted
|
||||
DurationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is subtracted
|
||||
)
|
||||
|
||||
const timeFmt = "2006-01-02T15:04:05.000Z07:00"
|
||||
|
|
Loading…
Add table
Reference in a new issue