Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Oct 25, 2023
1 parent 681a251 commit dd57316
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions x/examples/find-strategy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dd57316

Please sign in to comment.