https://github.com/ameshkov/godnsbench
Simple DNS bench util that supports encrypted protocols.
https://github.com/ameshkov/godnsbench
benchmark dns dns-over-https dns-over-quic dns-over-tls dnscrypt
Last synced: about 2 months ago
JSON representation
Simple DNS bench util that supports encrypted protocols.
- Host: GitHub
- URL: https://github.com/ameshkov/godnsbench
- Owner: ameshkov
- License: mit
- Created: 2022-08-18T16:45:10.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T11:10:16.000Z (6 months ago)
- Last Synced: 2025-03-18T06:22:52.179Z (2 months ago)
- Topics: benchmark, dns, dns-over-https, dns-over-quic, dns-over-tls, dnscrypt
- Language: Go
- Homepage:
- Size: 10.5 MB
- Stars: 64
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://goreportcard.com/report/ameshkov/godnsbench)
[](https://github.com/ameshkov/godnsbench/releases)# godnsbench
A very simple DNS benchmarking tool based on [dnsproxy][dnsproxy].
[dnsproxy]: https://github.com/AdguardTeam/dnsproxy
## How to install
* Using homebrew:
```shell
brew install ameshkov/tap/godnsbench
```
* From source:
```shell
go install github.com/ameshkov/godnsbench@latest
```
* You can use [a Docker image][dockerimage]:
```shell
docker run --rm ghcr.io/ameshkov/godnsbench --help
```
* You can get a binary from the [releases page][releases].[dockerimage]: https://github.com/ameshkov/godnsbench/pkgs/container/godnsbench
[releases]: https://github.com/ameshkov/godnsbench/releases
## Usage
```shell
Usage:
godnsbench [OPTIONS]Application Options:
-a, --address= Address of the DNS server you're trying to test. Note, that for encrypted DNS it should include the protocol (tls://,
https://, quic://, h3://)
-p, --parallel= The number of connections you would like to open simultaneously (default: 1)
-q, --query= The host name you would like to resolve. {random} will be replaced with a random string (default: example.org)
-f, --file= The path to the file with domain names to query
-t, --timeout= Query timeout in seconds (default: 10)
-r, --rate-limit= Rate limit (per second) (default: 0)
-c, --count= The overall number of queries we should send (default: 10000)
--insecure Do not validate the server certificate
-v, --verbose Verbose output (optional)
-o, --output= Path to the log file. If not set, write to stdout.Help Options:
-h, --help Show this help message
```## Examples
10 connections, 1000 queries to Google DNS using DNS-over-TLS:
```shell
godnsbench -a tls://dns.google -p 10 -c 1000
```10 connections, 1000 queries to Google DNS using DNS-over-HTTPS with rate limit
not higher than 10 queries per second:```shell
godnsbench -a https://dns.google/dns-query -p 10 -c 1000 -r 10
```10 connections, 1000 queries for `example.net` to Google DNS using DNS-over-TLS:
```shell
godnsbench -a https://dns.google/dns-query -p 10 -c 1000 -q example.net
```10 connections, 1000 queries for `example.net` with timeout 1 second to
AdGuard DNS using DNS-over-QUIC:```shell
godnsbench -a quic://dns.adguard.com -p 10 -c 1000 -t 1 -q example.net
```10 connections, 1000 queries for random subdomains of `example.net` with
timeout 1 second to Google DNS using DNS-over-TLS:```shell
godnsbench -a tls://dns.google -p 10 -c 1000 -t 1 -q {random}.example.net
```