Skip to content

Conversation

@nightowlnerd
Copy link
Owner

Summary

  • Scanner now retries DNS queries once on timeout (UDP packet loss), recovering IPs that
    would otherwise be falsely rejected
  • Only timeout errors trigger retry — non-timeout failures (refused, hijacking, empty
    response) fail immediately
  • Benchmarker unchanged — already resilient via 20 queries + threshold filtering

Details

  • New ScanRetries constant (1 retry = 2 total attempts per IP)
  • isTimeout() helper checks both net.Error interface and string matching
  • Retry covers both A-record probe and TXT domain verification phases

Test plan

  • TestE2ERetryOnTimeout — flaky server drops 1st request, retry recovers
  • TestE2ERetryExhausted — all retries fail, IP correctly rejected
  • TestE2ERetryDomainVerification — A-record retry + TXT passes
  • TestE2ERetryDomainVerificationTXTTimeout — both A and TXT retry via alternating-drop
    server
  • TestIsTimeout — unit test for timeout detection
  • Full suite (43 tests) passing

@nightowlnerd nightowlnerd merged commit 0409dbc into main Feb 6, 2026
2 checks passed
@nightowlnerd nightowlnerd deleted the feat/retry-on-timeout branch February 6, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant