Initial commit
This commit is contained in:
commit
2d98ed1b5d
33 changed files with 4644 additions and 0 deletions
111
checker/definition.go
Normal file
111
checker/definition.go
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
package checker
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
sdk "git.happydns.org/checker-sdk-go/checker"
|
||||
)
|
||||
|
||||
// Version is the checker version reported in CheckerDefinition.Version.
|
||||
var Version = "built-in"
|
||||
|
||||
// Definition returns the CheckerDefinition for the resolver-propagation
|
||||
// checker.
|
||||
func (p *resolverPropagationProvider) Definition() *sdk.CheckerDefinition {
|
||||
return &sdk.CheckerDefinition{
|
||||
ID: "resolver-propagation",
|
||||
Name: "Worldwide DNS propagation",
|
||||
Version: Version,
|
||||
Availability: sdk.CheckerAvailability{
|
||||
ApplyToService: true,
|
||||
LimitToServices: []string{
|
||||
"abstract.Origin",
|
||||
"abstract.NSOnlyOrigin",
|
||||
},
|
||||
},
|
||||
ObservationKeys: []sdk.ObservationKey{ObservationKeyResolverPropagation},
|
||||
HasHTMLReport: true,
|
||||
HasMetrics: true,
|
||||
Options: sdk.CheckerOptionsDocumentation{
|
||||
UserOpts: []sdk.CheckerOptionDocumentation{
|
||||
{
|
||||
Id: "recordTypes",
|
||||
Type: "string",
|
||||
Label: "Record types to probe",
|
||||
Description: "Comma-separated list of RR types. The checker probes every listed type at the zone apex (and at each 'subdomains' entry).",
|
||||
Default: "SOA,NS,A,AAAA,MX,TXT,CAA",
|
||||
},
|
||||
{
|
||||
Id: "subdomains",
|
||||
Type: "string",
|
||||
Label: "Extra subdomains to probe",
|
||||
Description: "Comma-separated list of owner names to probe in addition to the zone apex (e.g. \"www,mail,@\"). Leave empty to only probe the apex.",
|
||||
Default: "www",
|
||||
},
|
||||
{
|
||||
Id: "includeFiltered",
|
||||
Type: "bool",
|
||||
Label: "Include filtered resolvers",
|
||||
Description: "Probe filtering resolvers (malware/family/adblock). Their answers routinely disagree with the consensus by design; enable only when diagnosing a blocklist hit.",
|
||||
Default: false,
|
||||
},
|
||||
{
|
||||
Id: "region",
|
||||
Type: "string",
|
||||
Label: "Restrict to region",
|
||||
Description: "Only probe resolvers from the given region. Use 'all' for a worldwide run.",
|
||||
Choices: []string{"all", "global", "na", "eu", "asia", "ru", "me"},
|
||||
Default: "all",
|
||||
},
|
||||
{
|
||||
Id: "transports",
|
||||
Type: "string",
|
||||
Label: "Transports",
|
||||
Description: "Comma-separated list of transports to probe. 'udp' is the baseline; 'tcp', 'dot' and 'doh' add coverage. Encrypted transports are only used for resolvers that publish an endpoint.",
|
||||
Default: "udp",
|
||||
},
|
||||
{
|
||||
Id: "resolverAllowlist",
|
||||
Type: "string",
|
||||
Label: "Resolver allowlist (advanced)",
|
||||
Description: "Comma-separated list of resolver IDs or IPs to probe exclusively. Leave empty to use the catalog selection. Example: \"cloudflare,google,9.9.9.9\".",
|
||||
Default: "",
|
||||
},
|
||||
{
|
||||
Id: "latencyThresholdMs",
|
||||
Type: "uint",
|
||||
Label: "Latency warning threshold (ms)",
|
||||
Description: "Resolvers averaging above this value produce an info finding.",
|
||||
Default: float64(500),
|
||||
},
|
||||
{
|
||||
Id: "runTimeoutSeconds",
|
||||
Type: "uint",
|
||||
Label: "Run timeout (seconds)",
|
||||
Description: "Hard wall-clock budget for one propagation run. Slow resolvers beyond this simply report as unreachable.",
|
||||
Default: float64(30),
|
||||
},
|
||||
},
|
||||
DomainOpts: []sdk.CheckerOptionDocumentation{
|
||||
{
|
||||
Id: "domain_name",
|
||||
Label: "Zone name",
|
||||
AutoFill: sdk.AutoFillDomainName,
|
||||
},
|
||||
},
|
||||
ServiceOpts: []sdk.CheckerOptionDocumentation{
|
||||
{
|
||||
Id: "service",
|
||||
Label: "Origin service",
|
||||
AutoFill: sdk.AutoFillService,
|
||||
},
|
||||
},
|
||||
},
|
||||
Rules: Rules(),
|
||||
Interval: &sdk.CheckIntervalSpec{
|
||||
Min: 5 * time.Minute,
|
||||
Max: 24 * time.Hour,
|
||||
Default: 30 * time.Minute,
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue