Skip to content

Latest commit

 

History

History
240 lines (168 loc) · 4.73 KB

File metadata and controls

240 lines (168 loc) · 4.73 KB

CLI Reference

Complete reference for all command-line interface commands.


Global Options

python dns_benchmark.py [OPTIONS] COMMAND [ARGS]
Option Description
--config PATH Use custom config file
--verbose Enable debug logging
--help Show help message

Commands Overview

Command Description
fetch Blocklist management
services DNS service operations
test Run benchmarks
compare Compare services against baseline
report Report management

fetch

Manage blocklist downloads and cache.

fetch blocklists

Download blocklists from configured sources.

python dns_benchmark.py fetch blocklists [OPTIONS]
Option Description
--categories, -cat Categories to fetch (repeatable)
--all Fetch all available categories
--refresh Force re-download (ignore cache)
--dry-run Preview without downloading

Examples:

# Default categories
python dns_benchmark.py fetch blocklists

# Specific categories
python dns_benchmark.py fetch blocklists --categories ads --categories malware

# Force refresh
python dns_benchmark.py fetch blocklists --refresh

fetch cache-info

Display cached blocklist information.

python dns_benchmark.py fetch cache-info

fetch clear-cache

Delete cached blocklists.

python dns_benchmark.py fetch clear-cache [OPTIONS]
Option Description
--categories Specific categories to clear

services

Manage and test DNS services.

services list

List configured DNS services.

python dns_benchmark.py services list [OPTIONS]
Option Description
--filtered-only Show only filtered services
--unfiltered-only Show only unfiltered services

services test

Test a single DNS query.

python dns_benchmark.py services test SERVICE_NAME DOMAIN [OPTIONS]
Option Description
--query-type DNS record type (A, AAAA, CNAME, MX, TXT)

Examples:

python dns_benchmark.py services test "Quad9 Filtered" google.com
python dns_benchmark.py services test "AdGuard DNS" ads.example.com

test

Run DNS benchmarks.

python dns_benchmark.py test [OPTIONS]
Option Short Default Description
--categories -cat ads, malware, adult, gambling Categories to test
--services -s All filtered Services to test
--domains -n 100 Domains per category
--no-baseline False Skip baseline comparison
--no-legitimate False Skip false positive test
--quick False Quick test (10 domains)
--scan-all False All servers × all categories
--output-format -f html, json Report formats

Examples:

# Quick test
python dns_benchmark.py test --quick

# Full scan
python dns_benchmark.py test --scan-all --domains 50

# Custom benchmark
python dns_benchmark.py test \
    --categories ads malware \
    --services "AdGuard DNS" "Quad9 Filtered" \
    --domains 200 \
    -f html -f json

compare

Compare filtered DNS against unfiltered baseline.

python dns_benchmark.py compare [OPTIONS]
Option Short Description
--baseline -b Unfiltered baseline service (required)
--targets -t Filtered services to compare (repeatable)
--categories -cat Categories to test
--domains -n Domains per category

Example:

python dns_benchmark.py compare \
    -b "Google DNS" \
    -t "Quad9 Filtered" \
    -t "AdGuard DNS" \
    --categories ads malware \
    --domains 100

report

Manage and regenerate reports.

report list

List previous benchmark runs.

python dns_benchmark.py report list [OPTIONS]
Option Description
--limit Number of runs to show (default: 10)

report generate

Generate reports from database.

python dns_benchmark.py report generate [OPTIONS]
Option Description
--run-id Specific run ID
--latest Use most recent run
--format Output formats (repeatable)
--charts Generate Plotly charts

Examples:

# From specific run
python dns_benchmark.py report generate --run-id 5 --format html

# Latest with all formats
python dns_benchmark.py report generate --latest -f html -f json -f csv --charts

Exit Codes

Code Description
0 Success
1 General error
2 Invalid arguments