Use curl instead of wget
This commit is contained in:
parent
44dc2cf982
commit
bb116cb8c1
42
nench.sh
42
nench.sh
@ -20,7 +20,7 @@ printf '%s\n' '-------------------------'
|
||||
|
||||
printf '\n'
|
||||
|
||||
wget -q -r http://bench.wget.racing/ioping.static -O ioping.static
|
||||
curl -s --max-time 10 -o ioping.static http://bench.wget.racing/ioping.static
|
||||
chmod +x ioping.static
|
||||
|
||||
# Basic info
|
||||
@ -98,7 +98,7 @@ printf '\n'
|
||||
|
||||
# Network speedtests
|
||||
|
||||
ipv4=$(wget -4qO- http://icanhazip.com/)
|
||||
ipv4=$(curl -4 -s --max-time 5 http://icanhazip.com/)
|
||||
if [ -n "$ipv4" ]
|
||||
then
|
||||
printf 'IPv4 speedtests\n'
|
||||
@ -106,24 +106,24 @@ then
|
||||
printf '\n'
|
||||
|
||||
printf ' Cachefly CDN: '
|
||||
timeout 50 wget -4 -o /dev/stdout -O /dev/null http://cachefly.cachefly.net/100mb.test | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -4 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://cachefly.cachefly.net/100mb.test | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' Leaseweb (NL): '
|
||||
timeout 50 wget -4 -o /dev/stdout -O /dev/null http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -4 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' Softlayer DAL (US): '
|
||||
timeout 50 wget -4 -o /dev/stdout -O /dev/null http://speedtest.dal01.softlayer.com/downloads/test100.zip | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -4 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://speedtest.dal01.softlayer.com/downloads/test100.zip | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' Online.net (FR): '
|
||||
timeout 50 wget -4 -o /dev/stdout -O /dev/null http://ping.online.net/100Mo.dat | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -4 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://ping.online.net/100Mo.dat | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' OVH BHS (CA): '
|
||||
timeout 50 wget -4 -o /dev/stdout -O /dev/null http://proof.ovh.ca/files/100Mio.dat | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -4 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://proof.ovh.ca/files/100Mio.dat | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
else
|
||||
printf 'No IPv4 connectivity detected\n'
|
||||
@ -131,7 +131,7 @@ fi
|
||||
|
||||
printf '\n'
|
||||
|
||||
ipv6=$(wget -6qO- http://icanhazip.com/)
|
||||
ipv6=$(curl -6 -s --max-time 5 http://icanhazip.com/)
|
||||
if [ -n "$ipv6" ]
|
||||
then
|
||||
printf 'IPv6 speedtests\n'
|
||||
@ -139,20 +139,20 @@ then
|
||||
printf '\n'
|
||||
|
||||
printf ' Leaseweb (NL): '
|
||||
timeout 50 wget -6 -o /dev/stdout -O /dev/null http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -6 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://mirror.nl.leaseweb.net/speedtest/100mb.bin | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' Softlayer DAL (US): '
|
||||
timeout 50 wget -6 -o /dev/stdout -O /dev/null http://speedtest.dal01.softlayer.com/downloads/test100.zip | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -6 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://speedtest.dal01.softlayer.com/downloads/test100.zip | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' Online.net (FR): '
|
||||
timeout 50 wget -6 -o /dev/stdout -O /dev/null http://ping6.online.net/100Mo.dat | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -6 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://ping6.online.net/100Mo.dat | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
printf ' OVH BHS (CA): '
|
||||
timeout 50 wget -6 -o /dev/stdout -O /dev/null http://proof.ovh.ca/files/100Mio.dat | \
|
||||
awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); if (speed ~ /null/) {print "timeout (< 2MB/s)"} else {print speed}}'
|
||||
curl -6 --max-time 10 -so /dev/null -w '%{speed_download}\n' http://proof.ovh.ca/files/100Mio.dat | \
|
||||
awk '{ printf "%.2f MiB/s\n", $0 / 1024 / 1024 } END { if (NR == 0) { print "timeout (< 2MB/s)" } }'
|
||||
|
||||
else
|
||||
printf 'No IPv6 connectivity detected\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user