Documentation
¶
Index ¶
- func CheckWildcard(ctx context.Context, domain string, timeout time.Duration, dnsServer string) (bool, error)
- func ResolveDomain(ctx context.Context, domain string, timeout time.Duration, dnsServer string, ...) bool
- func ResolveDomainWithRetry(ctx context.Context, domain string, timeout time.Duration, dnsServer string, ...) bool
- func SimulateResolution(domain string, hitRate int, verbose bool) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckWildcard ¶
func CheckWildcard(ctx context.Context, domain string, timeout time.Duration, dnsServer string) (bool, error)
CheckWildcard probes the domain with two random subdomains. If both resolve the domain almost certainly uses wildcard DNS. Returns (isWildcard, error).
func ResolveDomain ¶
func ResolveDomain(ctx context.Context, domain string, timeout time.Duration, dnsServer string, verbose bool) bool
ResolveDomain performs a single DNS lookup for the given domain using the specified server and timeout. It returns true if the domain resolves.
func ResolveDomainWithRetry ¶
func ResolveDomainWithRetry(ctx context.Context, domain string, timeout time.Duration, dnsServer string, verbose bool, maxAttempts int) bool
ResolveDomainWithRetry calls ResolveDomain up to maxAttempts times, respecting ctx cancellation between attempts with a linear backoff delay.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.