Documentation Index
Fetch the complete documentation index at: https://mintlify.com/maravento/blackweb/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The DNS lookup phase is the most resource-intensive part of the BlackWeb update process. It validates millions of domains through actual DNS queries to exclude nonexistent or invalid domains from the final blocklist.Why DNS Validation?
Many public blocklist sources contain:- Expired domains
- Nonexistent domains (typos in original lists)
- Domains that never existed
- Domains that have been taken down
Two-Step Validation Process
The script performs DNS lookup in two steps with different timeout values:Step 1: Initial Lookup (1-second timeout)
bwupdate/bwupdate.sh
- Uses
host -W 1(1-second timeout) - Marks domains as
HIT(resolved) orFAULT(failed) - Runs in parallel using
xargs -P $PROCS - Real-time progress display
- Resumes from checkpoint if interrupted
Step 2: Retry Failed Domains (2-second timeout)
bwupdate/bwupdate.sh
- First pass (1s timeout): Quickly filters out obviously dead domains
- 10-second pause: Prevents overwhelming DNS infrastructure
- Second pass (2s timeout): Gives slower-responding domains a second chance
Parallel Processing Configuration
The number of parallel DNS queries is controlled by thePROCS variable:
bwupdate/bwupdate.sh
Understanding PROCS
The formula is:Recommended Settings
- Conservative
- Balanced
- Aggressive (Default)
- Extreme
- Limited bandwidth connections
- Satellite or metered internet
- Shared DNS servers
- Low-power systems
Example: Core i5 CPU
For a Core i5 with 4 physical cores and 8 threads (Hyper-Threading):Checking Your CPU Configuration
Real-Time Progress Display
The script shows live processing statistics:- Updates every second
- Shows domains processed vs. total
- Displays percentage completion
- Runs in a background process
Implementation
bwupdate/bwupdate.sh
DNS Query Results
HIT (Domain Resolved)
- Domain exists
- DNS resolves successfully
- Domain will be included in final blocklist
FAULT (Domain Failed)
- Domain doesn’t exist (NXDOMAIN)
- DNS query timed out
- Temporary DNS failure
- Domain will be excluded from blocklist
Resume Capability
The script can resume DNS lookup if interrupted:bwupdate/bwupdate.sh
- Checks if
dnslookup1file exists and has content - Excludes already-processed domains
- Only queries remaining domains
- Prevents duplicate work
If you interrupt the script during DNS lookup (Ctrl+C), it automatically resumes from where it left off on the next run.
Adjusting for Your Environment
Factors to Consider
| Factor | Lower PROCS | Higher PROCS |
|---|---|---|
| CPU | Older/slower CPU | Modern multi-core CPU |
| Network | Satellite, metered, slow | Fiber, unlimited, fast |
| DNS Server | Public DNS (8.8.8.8) | Local caching DNS |
| System Load | Production server | Dedicated test machine |
| Priority | Minimize impact | Maximize speed |
Recommended Adjustments
Editbwupdate.sh line 388:
Performance Impact
Monitoring Performance
While the script runs, monitor:Troubleshooting
Too many FAULT results
Too many FAULT results
- Reduce PROCS value (network/DNS overload)
- Check DNS server responsiveness
- Verify internet connection stability
- Consider using local caching DNS (dnsmasq, unbound)
Process extremely slow
Process extremely slow
- Increase PROCS value (if system can handle it)
- Use faster DNS servers (Cloudflare 1.1.1.1, Google 8.8.8.8)
- Check for bandwidth throttling
- Verify CPU isn’t maxed out
System becomes unresponsive
System becomes unresponsive
- Immediately reduce PROCS value
- Kill the script and restart with lower parallelism
- Monitor system resources before restarting
- Consider running on dedicated hardware
DNS rate limiting
DNS rate limiting
- Use local recursive DNS resolver
- Reduce PROCS significantly
- Add delays between queries
- Spread queries across multiple DNS servers
Next Steps
Domain Debugging
Learn about domain validation, TLD checking, Punycode conversion, and ASCII cleanup
