Update test utility

This commit is contained in:
sn0wb0i 2019-07-18 17:12:07 -04:00
parent 14aea6e9ca
commit fbf1dd22c4
1 changed files with 16 additions and 4 deletions

View File

@ -1,13 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
function test { function test {
SERVER="$1.dns.nixnet.xyz" SUFFIX="dns.nixnet.xyz"
echo "TRYING $SERVER (DNS-over-TLS)" SERVER="$1.$SUFFIX"
IP_ADDR="$(kdig @$SERVER +noall +short +tls-ca +tls-host=$SERVER +tls-sni=$SERVER whoami.v4.powerdns.org)" SERVER4=$(dig -t A +short $SERVER | grep -v "xyz")
SERVER6=$(dig -t AAAA +short $SERVER | grep -v "xyz")
echo "$IP_ADDR ($(dig +short -x $IP_ADDR))" echo "TRYING IPv4 $SERVER (DNS-over-TLS, $SERVER4)"
IP4_ADDR="$(kdig @$SERVER4 +noall +short +tls-ca +tls-host=$SERVER +tls-sni=$SERVER -t A whoami.v4.powerdns.org)"
echo "$IP4_ADDR ($(dig +short -x $IP4_ADDR))"
echo "TRYING IPv6 $SERVER (DNS-over-TLS, $SERVER6)"
IP6_ADDR="$(kdig @$SERVER6 +noall +short +tls-ca +tls-host=$SERVER +tls-sni=$SERVER -t AAAA whoami.v6.powerdns.org)"
echo "$IP6_ADDR ($(dig +short -x $IP6_ADDR))"
echo ""
} }
@ -15,6 +24,9 @@ test "adblock.lv1"
test "adblock.lux1" test "adblock.lux1"
test "adblock.ny1" test "adblock.ny1"
echo ""
echo ""
test "uncensored.lv1" test "uncensored.lv1"
test "uncensored.lux1" test "uncensored.lux1"
test "uncensored.ny1" test "uncensored.ny1"