7 unstable releases (3 breaking)
new 0.4.0 | Apr 25, 2024 |
---|---|
0.3.0 | Dec 23, 2023 |
0.2.0 | Dec 17, 2023 |
0.1.3 | Nov 10, 2023 |
0.1.2 | Oct 5, 2023 |
#690 in Network programming
196 downloads per month
290KB
453 lines
dns-bench
Description
This repository provides DNS benchmarking command line tool written in Rust. It iterates through built-in list of public DNS servers, measures their response time and print table with sorted results in console. It can be used to find the fastest DNS in your location for better internet browsing experience. An example of console output, list of features and list of built-in DNS servers can be found below.
Example
Features
- Built-in list of public DNS servers.
- Requests count configuration. By default, 3 requests are made to each DNS server.
- Threads count configuration. By default, 8 threads are used.
- Timeout configuration. By default, 3 seconds timeout is used.
- Domain configuration. By default, google.com domain is used.
- Protocol configuration, either TCP or UDP. By default, UDP is used.
- Lookup IP version configuration, either IPv4 or IPv6. By default, IPv4 is used.
- Configuration of IP version used to establish connection, either IPv4 or IPv6. By default, IPv4 is used.
List of built-in DNS servers
- Google Public DNS
- Cloudflare
- Quad9
- ControlD
- OpenDNS
- CleanBrowsing
- AdGuard DNS
- Comodo Secure DNS
- Level3
- Verisign
Installation
From crates.io (Recommended)
Run the following command and wait until the crate is compiled:
$ cargo install dns-bench
Now you can run compiled binary:
$ dns-bench [OPTIONS]
From git repository
Run the following command and wait until the crate is compiled:
$ cargo install --git https://github.com/qwerty541/dns-bench.git --tag v0.4.0 dns-bench
Also you can remove tag option to install the latest development version.
Now you can run compiled binary:
$ dns-bench [OPTIONS]
Options
Below is a list of currently supported options.
$ dns-bench --help
Find the fastest DNS in your location using simple command line tool.
Usage: dns-bench [OPTIONS]
Options:
--domain <DOMAIN>
The domain to resolve [default: google.com]
--threads <THREADS>
The number of threads to use [default: 8]
--requests <REQUESTS>
The number of requests to make [default: 3]
--timeout <TIMEOUT>
The timeout in seconds [default: 3]
--protocol <PROTOCOL>
The protocol to use [default: udp] [possible values: tcp, udp]
--name-servers-ip <NAME_SERVERS_IP>
The IP version to use for the name servers [default: v4] [possible values: v4, v6]
--lookup-ip <LOOKUP_IP>
The IP version to use for the lookup [default: v4] [possible values: v4, v6]
-h, --help
Print help
-V, --version
Print version
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~9–18MB
~263K SLoC