Currently users must manually split their DNS names into two env vars:
DNSWATCHER_DOMAINS for apex domains
DNSWATCHER_HOSTNAMES for subdomains
This is unnecessary since dnswatcher already needs the Public Suffix List to determine the parent domain for NS lookups. It should accept a single list and classify automatically:
Use the PSL (golang.org/x/net/publicsuffix) to determine: is this an apex domain (eTLD+1) or a hostname under one?
Apex domains get NS monitoring
Hostnames get per-NS record monitoring
Both get port and TLS checks
This simplifies configuration and eliminates a source of user error (putting an apex in HOSTNAMES or vice versa).
Deprecate DNSWATCHER_DOMAINS and DNSWATCHER_HOSTNAMES in favor of DNSWATCHER_TARGETS. Keep the old vars working for backwards compat but log a deprecation warning.
Also use publicsuffix.EffectiveTLDPlusOne() in the resolver's parentDomain() function instead of the current naive 2-label split (which breaks for .co.uk, .com.au, etc.).
Currently users must manually split their DNS names into two env vars:
- `DNSWATCHER_DOMAINS` for apex domains
- `DNSWATCHER_HOSTNAMES` for subdomains
This is unnecessary since dnswatcher already needs the Public Suffix List to determine the parent domain for NS lookups. It should accept a single list and classify automatically:
- `DNSWATCHER_TARGETS=example.com,www.example.com,api.example.org`
- Use the PSL (`golang.org/x/net/publicsuffix`) to determine: is this an apex domain (eTLD+1) or a hostname under one?
- Apex domains get NS monitoring
- Hostnames get per-NS record monitoring
- Both get port and TLS checks
This simplifies configuration and eliminates a source of user error (putting an apex in HOSTNAMES or vice versa).
Deprecate `DNSWATCHER_DOMAINS` and `DNSWATCHER_HOSTNAMES` in favor of `DNSWATCHER_TARGETS`. Keep the old vars working for backwards compat but log a deprecation warning.
Also use `publicsuffix.EffectiveTLDPlusOne()` in the resolver's `parentDomain()` function instead of the current naive 2-label split (which breaks for `.co.uk`, `.com.au`, etc.).
sneak
was assigned by clawbot2026-02-20 05:04:45 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently users must manually split their DNS names into two env vars:
DNSWATCHER_DOMAINSfor apex domainsDNSWATCHER_HOSTNAMESfor subdomainsThis is unnecessary since dnswatcher already needs the Public Suffix List to determine the parent domain for NS lookups. It should accept a single list and classify automatically:
DNSWATCHER_TARGETS=example.com,www.example.com,api.example.orggolang.org/x/net/publicsuffix) to determine: is this an apex domain (eTLD+1) or a hostname under one?This simplifies configuration and eliminates a source of user error (putting an apex in HOSTNAMES or vice versa).
Deprecate
DNSWATCHER_DOMAINSandDNSWATCHER_HOSTNAMESin favor ofDNSWATCHER_TARGETS. Keep the old vars working for backwards compat but log a deprecation warning.Also use
publicsuffix.EffectiveTLDPlusOne()in the resolver'sparentDomain()function instead of the current naive 2-label split (which breaks for.co.uk,.com.au, etc.).