Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3a471553f | ||
|
|
c341d70f73 | ||
|
|
cb29c8e392 | ||
|
|
ce7a250309 |
@@ -1,4 +1,4 @@
|
||||
# ekekDNSHelper
|
||||
# ekDNSHelper
|
||||
|
||||
A cross-platform CLI tool that resolves hostnames against DNS servers and writes the resulting IP-to-hostname mappings into the local hosts file. It manages a clearly delimited block within the hosts file so it can cleanly add and remove only its own entries.
|
||||
|
||||
@@ -6,7 +6,7 @@ By default, ekdns performs **smart resolution**: it discovers the authoritative
|
||||
|
||||
Built as a single static binary with no runtime dependencies.
|
||||
|
||||
**Copyright (c) 2024 Emberkom LLC**
|
||||
**Copyright (c) 2026 Emberkom LLC**
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+11
-3
@@ -85,11 +85,19 @@ func resolveDefault(hostname string, pool []string, localResolvers []string, con
|
||||
if authority != nil {
|
||||
fmt.Fprintf(w, "[dns] Selected authority: %s → %s\n",
|
||||
authority.Zone, strings.Join(authority.Nameservers, ", "))
|
||||
return resolveAuthoritative(ctx, authority, hostname, pool, localResolvers, config, depth, w)
|
||||
ips, err := resolveAuthoritative(ctx, authority, hostname, pool, localResolvers, config, depth, w)
|
||||
if err == nil {
|
||||
return ips, nil
|
||||
}
|
||||
// Stage 2 failed (e.g. sub-zone delegation referral not followed) —
|
||||
// fall through to Stage 3 parallel A fallback.
|
||||
fmt.Fprintf(w, "[dns] Stage 2 failed: %v\n", err)
|
||||
fmt.Fprintf(w, "[dns] Falling back to Stage 3 parallel A queries\n")
|
||||
} else {
|
||||
fmt.Fprintf(w, "[dns] Stage 1: No NS records found at any level\n")
|
||||
}
|
||||
|
||||
// Stage 3: No NS records found — fall back to parallel A queries.
|
||||
fmt.Fprintf(w, "[dns] Stage 1: No NS records found at any level\n")
|
||||
// Stage 3: Fall back to parallel recursive A queries.
|
||||
ips, err := ParallelAFallback(ctx, w, pool, hostname, timeout)
|
||||
if err != nil {
|
||||
return nil, addPrivateTLDHint(hostname, err)
|
||||
|
||||
Reference in New Issue
Block a user