From d277889981881e8ea0323d0d07040325e9804099 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Sat, 21 Dec 2024 22:32:33 +0400 Subject: [PATCH] feat: add 3 more dns clients --- .gitignore | 3 +++ build_dog.sh | 23 +++++++++++++++++++++++ build_doggo.sh | 22 ++++++++++++++++++++++ build_q.sh | 22 ++++++++++++++++++++++ main.sh | 11 ++++++++++- 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100755 build_dog.sh create mode 100755 build_doggo.sh create mode 100755 build_q.sh diff --git a/.gitignore b/.gitignore index f662ba8..1046fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,8 @@ /knot-dns /ldns /hickory-dns +/dog +/doggo +/q /unbound.log diff --git a/build_dog.sh b/build_dog.sh new file mode 100755 index 0000000..ac21015 --- /dev/null +++ b/build_dog.sh @@ -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' diff --git a/build_doggo.sh b/build_doggo.sh new file mode 100755 index 0000000..4f33142 --- /dev/null +++ b/build_doggo.sh @@ -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' diff --git a/build_q.sh b/build_q.sh new file mode 100755 index 0000000..8ed126e --- /dev/null +++ b/build_q.sh @@ -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' diff --git a/main.sh b/main.sh index e2d6fcf..57d5f5a 100755 --- a/main.sh +++ b/main.sh @@ -45,6 +45,9 @@ exe_dig="bind9/bin/dig/dig" exe_kdig="knot-dns/src/kdig" exe_drill="ldns/drill/drill" exe_hr="hickory-dns/target/release/resolve" +exe_dog="dog/target/release/dog" +exe_doggo="doggo/doggo" +exe_q="q/q" echo 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_drill=$(built_or_system "$exe_drill" drill "build_drill.sh" ldns) 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 @@ -68,7 +74,10 @@ run_bench () { "$exe_dig -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_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