mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-14 01:32:11 +00:00
17 lines
352 B
Bash
17 lines
352 B
Bash
#!/bin/sh
|
|
set -e -u
|
|
|
|
alias curl_cmd='curl --proto "=https" --proto-default https --http2 -siSL --tlsv1.3 --cert-status'
|
|
|
|
ipv6_success=1
|
|
ipv4_success=1
|
|
|
|
curl_cmd -6 'seirdy.one/ip' || ipv6_success=0
|
|
echo
|
|
curl_cmd -4 'seirdy.one/ip' || ipv4_success=0
|
|
echo
|
|
|
|
if [ "$ipv6_success" = 0 ] && [ "$ipv4_success" = 0 ]; then
|
|
echo "Failed to connect"
|
|
exit 1
|
|
fi
|