feat: add 3 more dns clients

This commit is contained in:
DarkCat09 2024-12-21 22:32:33 +04:00
parent e2659df9b9
commit d277889981
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82
5 changed files with 80 additions and 1 deletions

3
.gitignore vendored
View file

@ -2,5 +2,8 @@
/knot-dns /knot-dns
/ldns /ldns
/hickory-dns /hickory-dns
/dog
/doggo
/q
/unbound.log /unbound.log

23
build_dog.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
source .build.sh
echo
echo '==> Checking deps'
which git
which cargo
echo
echo '==> Cloning repo'
clone https://github.com/ogham/dog.git dog
cd dog
trap 'cd ..' EXIT
set_cflags
echo
echo '==> Building dog'
build_rust --no-default-features
echo
echo '==> Done'

22
build_doggo.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
source .build.sh
echo
echo '==> Checking deps'
which git
which go
echo
echo '==> Cloning repo'
clone https://github.com/mr-karan/doggo.git doggo
cd doggo
trap 'cd ..' EXIT
echo
echo '==> Building doggo'
build_go -o doggo ./cmd/doggo
echo
echo '==> Done'

22
build_q.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/bash
source .build.sh
echo
echo '==> Checking deps'
which git
which go
echo
echo '==> Cloning repo'
clone https://github.com/natesales/q.git q
cd q
trap 'cd ..' EXIT
echo
echo '==> Building q'
build_go -o q
echo
echo '==> Done'

11
main.sh
View file

@ -45,6 +45,9 @@ exe_dig="bind9/bin/dig/dig"
exe_kdig="knot-dns/src/kdig" exe_kdig="knot-dns/src/kdig"
exe_drill="ldns/drill/drill" exe_drill="ldns/drill/drill"
exe_hr="hickory-dns/target/release/resolve" exe_hr="hickory-dns/target/release/resolve"
exe_dog="dog/target/release/dog"
exe_doggo="doggo/doggo"
exe_q="q/q"
echo echo
echo '==> Checking deps' echo '==> Checking deps'
@ -54,6 +57,9 @@ exe_dig=$(built_or_system "$exe_dig" dig "build_dig.sh" bind-utils)
exe_kdig=$(built_or_system "$exe_kdig" kdig "build_kdig.sh" knot-utils) exe_kdig=$(built_or_system "$exe_kdig" kdig "build_kdig.sh" knot-utils)
exe_drill=$(built_or_system "$exe_drill" drill "build_drill.sh" ldns) exe_drill=$(built_or_system "$exe_drill" drill "build_drill.sh" ldns)
exe_hr=$(built_or_system "$exe_hr" resolve "build_hr.sh") exe_hr=$(built_or_system "$exe_hr" resolve "build_hr.sh")
exe_dog=$(built_or_system "$exe_dog" dog "build_dog.sh")
exe_doggo=$(built_or_system "$exe_doggo" doggo "build_doggo.sh")
exe_q=$(built_or_system "$exe_q" q "build_q.sh")
echo echo
@ -68,7 +74,10 @@ run_bench () {
"$exe_dig -p 2253 +short $1 $2 @127.0.0.1" \ "$exe_dig -p 2253 +short $1 $2 @127.0.0.1" \
"$exe_kdig -p 2253 +short $1 $2 @127.0.0.1" \ "$exe_kdig -p 2253 +short $1 $2 @127.0.0.1" \
"$exe_drill -p 2253 -Q $1 $2 @127.0.0.1" \ "$exe_drill -p 2253 -Q $1 $2 @127.0.0.1" \
"$exe_hr -n 127.0.0.1:2253 -t $1 $2" "$exe_hr -n 127.0.0.1:2253 -t $1 $2" \
"$exe_dog -n 127.0.0.1:2253 -t $1 $2" \
"$exe_doggo -n 127.0.0.1:2253 --short -t $1 $2" \
"$exe_q -s 127.0.0.1:2253 -r -t $1 $2"
} }
echo echo