From dd573167449840246938e3c8546b1b303b880a86 Mon Sep 17 00:00:00 2001 From: Vinicius Fortuna Date: Wed, 25 Oct 2023 13:55:01 -0400 Subject: [PATCH] Add comments --- x/examples/find-strategy/main.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/x/examples/find-strategy/main.go b/x/examples/find-strategy/main.go index ec406b2b..57d8ebf4 100644 --- a/x/examples/find-strategy/main.go +++ b/x/examples/find-strategy/main.go @@ -321,6 +321,36 @@ func main() { fmt.Printf("; status=ok (%v) ✅\n", ips) } + /* + Scoring + - Control (tests if the client works at all): get NS for ".". If fails: -10 (BROKEN) + - General injection test (tests if the injection depends on the resolver): [testDomain NS]. If error or answer: -1. Save [type value] as fingerprint + - Test transports: UDP, TCP, TLS + - For plaintext, test techniques: mix case, split + - Try changing case + + Hostmap should not go through scoring at first. We shouldn't use it if not needed. Also, it only helps A/AAAA, it doesn't work with NS, SOA, etc. + + Lookup (domain A/AAAA) at root resolver (doesn’t apply to DoH and system resolver) + no error: 0 + error: -1 + has answer: -1 + + Lookup (domain, NS) (breaks with hostmap) + expected answer: +1 + unknown answer: 0 + bad answer or no answer: -1 + Lookup (domain, CNAME) (breaks with hostmap) + expected answer: +1 + unknown answer: 0 + Lookup IP, then reverse IP. A and AAAA + expected domain: +1 + unknown domain or no answer: 0 + Is Private? + public: 0 + private: -1 + */ + // TODO: // Add recursive resolver. // Save RTT for sorting.