batch_resolve_cli 0.3.1

Fast asynchronous batch DNS resolver built on top of Tokio and TRust-DNS
batch_resolve_cli-0.3.1 is not a library.

Build Status Crates.io Gitter Donate

This page in Russian

Batch Resolve

Fast asynchronous DNS resolver

Installing

Static binary

Every release binary can be found in the the list of versions. Place it to your binary folder and proceed to usage.

Install from crates.io

If you have rust toolkit installed, you can install batch_resolve with

cargo install batch_resolve_cli

Usage

Input and output format is list delimited with new line. Consider such input domains.txt

google.com
rust-lang.org
mozilla.org

Resolve all A records:

batch_resolve --in domains.txt --out hosts.txt --query A

Resolve A and AAAA records:

batch_resolve -i domains.txt -o hosts.txt -q A
              -i domains.txt -o hosts.txt -q AAAA  

Configuration

By default batch_resolve uses Google DNS servers 8.8.8.8 and 8.8.4.4 and retries 10 times on Connection Timeout error. These and Queries Per Second parameters may be altered in configuration file.

Configuration file may be placed in the following locations (priority descending):

batch_resolve.toml
$HOME/.config/batch_resolve.toml
/etc/batch_resolve.toml

Configuration includes DNS servers, maximum simultaneously running resolve tasks and retries on failure count

# DNS servers are only accepted as socket addresses
# If port is not specified default DNS :53 port will be used
dns = [
    "8.8.8.8"
]

# Simultaneous resolve tasks
tasks = 5000

# Times to retry on connection timeout
retry = 5

Configuration template can also be found here

Contributing

To build project please clone the repo

git clone git@github.com:mersinvald/batch_resolve.git

And run cagro build

cd batch_resolve
cargo build

batch_resolve can be build with stable rust

Please file an issue if you have any improvement suggestion or bug report.

Pull Requests are welcome also!

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Donate

If you feel that this work is worth something and that it saved your time you can give me a cup of coffee :)