refactor: handle DNS whitelists

Introduce a single DNSListChecker struct with flags to avoid code
duplication with already existing RBL checker.
This commit is contained in:
nemunaire 2026-03-07 16:18:10 +07:00
commit ff013fe694
10 changed files with 225 additions and 107 deletions

View file

@ -65,6 +65,7 @@ type AnalysisConfig struct {
DNSTimeout time.Duration
HTTPTimeout time.Duration
RBLs []string
DNSWLs []string
CheckAllIPs bool // Check all IPs found in headers, not just the first one
}
@ -88,6 +89,7 @@ func DefaultConfig() *Config {
DNSTimeout: 5 * time.Second,
HTTPTimeout: 10 * time.Second,
RBLs: []string{},
DNSWLs: []string{},
CheckAllIPs: false, // By default, only check the first IP
},
}