feat: Add providers to index page
All checks were successful
Build Docker / Build Docker (push) Successful in 23s

This commit is contained in:
2023-12-16 17:19:42 +11:00
parent 6ba2cd3894
commit 95fd1044ac
4 changed files with 76 additions and 17 deletions

View File

@@ -14,9 +14,9 @@ HTTPDOMAIN="nathan.woodburn"
# Test DNS over HTTPS via GET request
GetStandard=$(curl --silent -H 'accept: application/dns-json' 'https://'$SERVER'/dns-query?name='$TXTDOMAIN'&type=TXT')
# Verify that the response is not empty and has an answer of TXT with content "Test"
# Verify that the response is not empty and has an answer of TXT with content "DNS SUCCESS"
test=$(jq -e '.Answer[] | select(.type == 16)' <<< $GetStandard)
if [ $test ]; then
if [[ $test == *"DNS SUCCESS"* ]]; then
echo "DNS over HTTPS GET plain request test passed with content:"
echo $test | jq .
else
@@ -38,8 +38,8 @@ fi
IP=$(dig +short $SERVER)
# Test using kdig
kdigtest=$(kdig +tls-ca +tls-host=$SERVER $TXTDOMAIN @$IP TXT)
# Verify that the response is not empty and has text "Test"
if [[ $kdigtest == *"Test"* ]]; then
# Verify that the response is not empty and has text "DNS SUCCESS"
if [[ $kdigtest == *"DNS SUCCESS"* ]]; then
echo "DNS over TLS kdig test passed"
else
echo "DNS over TLS kdig test failed"
@@ -48,8 +48,8 @@ fi
# Plain DNS
# Test using dig
digtest=$(dig $TXTDOMAIN @$SERVER TXT)
# Verify that the response is not empty and has text "Test"
if [[ $digtest == *"Test"* ]]; then
# Verify that the response is not empty and has text "DNS SUCCESS"
if [[ $digtest == *"DNS SUCCESS"* ]]; then
echo "Plain DNS dig test passed"
else
echo "Plain DNS dig test failed"