Skip to content

-r resolver pool rejects tls:// and https:// resolvers the dialer already supports #404

Closed

Description

@TMHSDigital

Summary

The -r resolver pool accepts only plain ip[:port] lines, even though every pool member is built with the dialer that already supports DoT and DoH. Encrypted resolvers can be used only as the single trusted -dns-server.

Where

  • internal/dns/pool.go:101-127 (ParseResolverList rejects anything but an IP)
  • internal/dns/pool.go:132-138 (NewPool builds members with newResolver)
  • internal/dns/resolver.go:160-161, internal/dns/transport.go:25-41 (newDialer: UDP/TCP, DoT or DoH)
  • internal/validate/validate.go:47-76 (DNSServer already validates tls:// and https://)

Details

if err != nil || net.ParseIP(host) == nil || port == "" {
    return nil, fmt.Errorf("invalid resolver %q: want ip or ip:port", line)
}

A resolvers file containing tls://1.1.1.1 fails with invalid resolver "tls://1.1.1.1": want ip or ip:port.

Impact

Operators on networks that block or tamper with UDP 53, or who want encrypted queries, cannot spread a large scan over several encrypted resolvers. The same limit applies to the TUI's Resolver Pool field and to pkg/subenum's ResolverPool, which share NewPoolFromLines.

Suggested fix

In ParseResolverList, accept lines starting with tls:// or https:// once they pass validate.DNSServer. Normalise tls:// entries to their default port for dedupe. Update the -r help text, docs/_includes/flags.md and the docs.

Open questions:

  • CNAME/NS/MX/TXT lookups use a custom exchange. Confirm it routes pool DoT/DoH members correctly.
  • How do per-resolver rate caps and canary checks behave with DoH connection reuse?

Acceptance criteria

  • -r files may mix ip[:port], tls://host[:port] and https://host/path entries
  • Pool lookups for every record type use each member's transport
  • Tests using the hermetic DoT/DoH test servers

Getting started

  • Relevant files: internal/dns/pool.go, internal/validate/validate.go
  • How to run tests: go test ./internal/dns/ ./internal/validate/

Filed by repo-audit/full-audit at dd5b156. Severity: medium. Effort: S. audit-key: enhancement|internal/dns/pool.go|ParseResolverList

Activity

  1. added
    enhancement
    help wanted
    area: dns
    severity: medium
    on Nov 17, 2026
  2. TMHSDigital commented on Nov 18, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in f524fcc. ParseResolverList now also takes tls://host[:port] and https://host/path entries that pass the -dns-server validator, writes a DoT entry's default port out so tls://x and tls://x:853 dedupe, and the forms can be mixed. Member lookups, the raw CNAME query included, dial through each member's own resolver, so each uses its transport. Members are shown in stats and -dry-run without a DoH credential. The -r help, the site flag table, the README and the library's ResolverPool doc list the new forms; the TUI and pkg/subenum share the parser.

    On the open questions: the custom CNAME exchange dials through resolver.Dial of the member, so it uses the member's DoT/DoH dialer. Rate caps book slots per lookup before dialing, independent of connection reuse, and canary checks go through the same member lookup path.

    Verified: TestPoolMembersUseTheirTransport probes a pool of the hermetic UDP, DoT and DoH test servers for A, AAAA and CNAME; TestParseResolverListEncrypted covers parsing, dedupe and error redaction. Full suite, vet and golangci-lint pass; CI green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dnsenhancementhelp wantedseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions