A lightweight DNS resolver aggregation tool that collects DNS resolver IP addresses from multiple public and trusted sources.
git clone https://github.com/karanshergill/rexolvers
cd rexolvers
go build -o rexolvers .# Build the Docker image
docker build -t rexolvers .
# Or pull from a registry (if available)
docker pull your-registry/rexolvers:latestProcess public resolvers:
./rexolvers --publicProcess trusted resolvers:
./rexolvers --trustedProcess both types:
./rexolvers --allSave to database:
./rexolvers --trusted --dbSave only to database (skip file):
./rexolvers --public --db --file=falseList resolvers from database:
# List trusted resolvers
./rexolvers --list=trusted
# List public resolvers
./rexolvers --list=public
# List all resolvers
./rexolvers --list=allShow database statistics:
./rexolvers --statsDocker usage allows you to run the application in a containerized environment and export the database to your host machine.
# Create directory for database export
mkdir -p ./docker-output
# Build the Docker image
docker build -t rexolvers .Process all resolvers and save to database:
docker run -v $(pwd)/docker-output:/app/data rexolvers --all --dbProcess public resolvers only:
docker run -v $(pwd)/docker-output:/app/data rexolvers --public --dbProcess trusted resolvers only:
docker run -v $(pwd)/docker-output:/app/data rexolvers --trusted --dbList resolvers from exported database:
# List all resolvers
docker run -v $(pwd)/docker-output:/app/data rexolvers --list=all
# List trusted resolvers
docker run -v $(pwd)/docker-output:/app/data rexolvers --list=trusted
# List public resolvers
docker run -v $(pwd)/docker-output:/app/data rexolvers --list=publicShow database statistics:
docker run -v $(pwd)/docker-output:/app/data rexolvers --statsAfter running with the --db flag, the SQLite database will be available at:
./docker-output/resolvers.db
You can then:
- Copy this database file anywhere you need it
- Query it directly with sqlite3:
sqlite3 ./docker-output/resolvers.db - Use it with other tools that accept SQLite databases
# Complete workflow - fetch data and export database
docker build -t rexolvers .
mkdir -p ./docker-output
docker run -v $(pwd)/docker-output:/app/data rexolvers --all --db
# Check what was collected
docker run -v $(pwd)/docker-output:/app/data rexolvers --stats
# Export trusted resolvers for use with other tools
docker run -v $(pwd)/docker-output:/app/data rexolvers --list=trusted > trusted_resolvers.txt| Flag | Description | Default |
|---|---|---|
--public |
Process public resolvers | false |
--trusted |
Process trusted resolvers | false |
--all |
Process both public and trusted resolvers | false |
--db |
Save resolvers to SQLite database | false |
--file |
Save resolvers to text files | true |
--list |
List resolvers from database (public|trusted|all) | "" |
--stats |
Show database statistics | false |
public_resolvers.txt: Contains public DNS resolver IPstrusted_resolvers.txt: Contains trusted DNS resolver IPsresolvers.db: SQLite database with all resolvers
The SQLite database uses the following schema:
CREATE TABLE resolvers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
ip_address TEXT UNIQUE NOT NULL,
resolver_type TEXT NOT NULL,
source_url TEXT,
added_at DATETIME DEFAULT CURRENT_TIMESTAMP
);The tool uses a YAML configuration file located at:
- Linux/macOS:
$HOME/.config/rexolvers/config.yaml - Windows:
%APPDATA%\rexolvers\config.yaml
# Get all resolvers from database
./rexolvers --list=all > resolvers.txt
massdns -r resolvers.txt -t A domains.txt# Using sqlite3 command line
sqlite3 resolvers.db "SELECT COUNT(*) FROM resolvers WHERE resolver_type='trusted';"# Initial setup - fetch and save everything
./rexolvers --all --db
# Daily update - refresh database only
./rexolvers --all --db --file=false
# Export for specific tool
./rexolvers --list=trusted > my_resolvers.txt
# Check what's in database
./rexolvers --statsThis project is licensed under the MIT License.