Gary and multica-agent
d66dcbe067
feat: implement CLI flags and configuration handling (HAN-382)
...
CI / test (pull_request) Waiting to run
- Created internal/config/config.go with Config struct containing all 15 CLI flags
- Added ParseQueryType() for validating record types (A, AAAA, NS, CNAME, MX, TXT, SOA, PTR, ANY)
- Added ParseUDPSize() with validation (512-4096)
- Added ParseMaxDepth() with validation (1-100)
- Added ParseRetries() with validation (0-10)
- Added Validate() for cross-field validation (e.g., --always-tcp requires --allow-tcp)
- Added GetDomain() for validating the required positional argument
- Added PrintUsage() displaying all flags with --no- variants for display options
- Updated cmd/exploredns/main.go with flag definitions using the standard flag package
- Proper flag parsing and config population
- Manual parsing of debug level (supports -dd)
- Support for --no-* display flags (e.g., --no-show-progress)
- Config validation before execution
- Integration with traversal engine using dns.QueryConfig and traverse.TraverserConfig
- Clean error handling with descriptive messages
All flags implemented:
- --type TYPE (default A)
- --root-server HOST
- --all-root-servers
- --root-aaaa
- --follow-aaaa
- --udp-size SIZE (default 2048)
- --allow-tcp (default true)
- --always-tcp
- --max-depth DEPTH (default 20)
- --retries TIMES (default 2)
- --fast (default true)
- --verbose, -v
- --debug, -d (stackable: -dd)
- --quiet, -q
- --show-progress, --no-show-progress
- --show-resolves, --no-show-resolves
- --show-servers, --no-show-servers
- --show-versions, --no-show-versions
- --show-all-stats, --no-show-all-stats
- --show-results, --no-show-results
- --show-summary-results, --no-show-summary-results
Validation: Invalid inputs produce clear error messages, exploredns --help displays usage with all options, all existing tests pass
Co-authored-by: multica-agent <github@multica.ai >
2026-06-07 16:36:48 +10:00
Gary and multica-agent
db3ad498f6
feat: implement CachingResolver with per-server query caching
...
CI / test (pull_request) Failing after 3h13m39s
Add Resolver interface, BasicResolver, and CachingResolver to internal/dns.
CachingResolver wraps any Resolver with an in-memory cache keyed by
(server IP, name, type, class). Cache entries respect DNS TTL from
responses, falling back to a configurable default TTL. Thread-safe
using sync.RWMutex. Includes Len, Clear, and PurgeExpired methods
for cache management.
Closes HAN-379 (Phase 2.2).
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:58:46 +10:00
Gary and multica-agent
924fcbd43a
feat: implement root server discovery (HAN-378)
...
CI / test (pull_request) Failing after 1m17s
Add RootServer struct and DiscoverRoots function that queries the local
resolver for NS records of the root zone, resolves each root name to
A/AAAA addresses, and returns a list of RootServer structs.
Supports:
- Default: discovers a single root server from local resolver
- --root-server override to target a specific root server
- --all-root-servers to discover all 13 root servers
- --root-aaaa flag to include IPv6 addresses
Includes unit tests for all helper functions and integration tests
that skip gracefully when no resolver is available.
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:44:59 +10:00
Gary
2338abd14f
Merge remote-tracking branch 'origin/main' into agent/go-expert-developer/8e316e05
...
CI / test (pull_request) Failing after 3h12m56s
# Conflicts:
# go.mod
# go.sum
2026-06-05 15:34:57 +10:00
Gary and multica-agent
596f0da9e1
chore: remove GitHub Actions CI workflow (replaced by Gitea Actions)
...
CI / test (push) Has been cancelled
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:33:45 +10:00
Gary and multica-agent
33ef99aca3
ci: add Gitea Actions workflow for Go unit tests
...
CI / test (pull_request) Failing after 3h10m14s
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:27:53 +10:00
Gary and multica-agent
fce7920611
feat: add DNS query/response layer with miekg/dns
...
Phase 1.2 implementation:
- internal/dns/types.go: DNS record type constants (A, AAAA, NS, CNAME, SOA,
MX, TXT, SRV, PTR, ANY) with QNameType helper and EDNS0 defaults
- internal/dns/query.go: Query/QueryWithExchange with UDP, configurable
EDNS0 buffer size, TCP fallback on truncation, always-TCP mode, configurable
retries with timeout, context support, and injectable ExchangeFunc for testing
- internal/dns/decode.go: Response classification (answer, referral, NODATA,
NXDOMAIN, SERVFAIL), CNAME chain extraction with dedup, truncation/RCODE
detection, and section extraction utilities
32 unit tests covering all acceptance criteria.
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:14:56 +10:00
Gary and multica-agent
8090182e1a
feat: Go project scaffolding - module init, directory structure, CLI skeleton, Makefile, CI
...
CI / build (pull_request) Failing after 3h1m44s
Co-authored-by: multica-agent <github@multica.ai >
2026-06-05 15:08:29 +10:00