Documentation
¶
Index ¶
Constants ¶
const DefaultWildcardProbeCount = 3
Variables ¶
This section is empty.
Functions ¶
func RegistrableRoot ¶
RegistrableRoot returns the registrable root for the provided host. The input is normalized first by lowercasing it, trimming a leading *., and removing any trailing dot. IP literals and invalid hosts are rejected.
Types ¶
type LookupFunc ¶
LookupFunc resolves a host and returns the address answers used for wildcard matching.
type Resolver ¶
type Resolver struct {
Domains *sliceutil.SyncSlice[string]
// contains filtered or unexported fields
}
Resolver represents a wildcard resolver extracted from shuffledns.
func NewResolver ¶
func NewResolver(domains []string, lookup LookupFunc) *Resolver
NewResolver initializes and creates a new resolver to find wildcards.
func NewResolverWithDomains ¶
func NewResolverWithDomains(domains *sliceutil.SyncSlice[string], lookup LookupFunc) *Resolver
NewResolverWithDomains initializes a resolver with a pre-built domain slice.
func (*Resolver) GetAllWildcardIPs ¶
func (*Resolver) LookupHost ¶
LookupHost returns wildcard IP addresses of a wildcard if it's a wildcard. To determine this, we split the target host by dots, generate wildcard permutations for each level of the matched domain, and probe those levels. If any of the host IPs overlap with wildcard answers collected for those levels, the host is treated as wildcard-backed.
func (*Resolver) SetProbeCount ¶
SetProbeCount sets the number of probes to use for wildcard detection. Higher values improve detection of wildcards using DNS round-robin.