mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
all: move nameserver resolution to public API
Make nameserver resolution functions more consistent and accessible: - Rename currentNameserversFromResolvconf to CurrentNameserversFromResolvconf - Move function to public API for better reusability - Update all internal references to use the new public API - Add comprehensive godoc comments for nameserver functions - Improve code organization by centralizing DNS resolution logic This change makes the nameserver resolution functionality more maintainable and easier to use across different parts of the codebase.
This commit is contained in:
committed by
Cuong Manh Le
parent
95699fa4a1
commit
29b8b4277c
+1
-1
@@ -647,7 +647,7 @@ func lookupIP(ctx context.Context, domain string, timeout int, bootstrapDNS []st
|
||||
// This is useful for doing PTR lookup in LAN network.
|
||||
func NewPrivateResolver(ctx context.Context) Resolver {
|
||||
nss := initDefaultOsResolver(ctx)
|
||||
resolveConfNss := currentNameserversFromResolvconf()
|
||||
resolveConfNss := CurrentNameserversFromResolvconf()
|
||||
localRfc1918Addrs := Rfc1918Addresses()
|
||||
n := 0
|
||||
for _, ns := range nss {
|
||||
|
||||
Reference in New Issue
Block a user