Merge pull request #114 from Vigilans/vigilans/fix-busybox-wget

Fix no "-4" and "-6" parameter when using busybox wget
This commit is contained in:
Vigilans authored and GitHub committed 2022-09-11 15:44:04 +08:00
commit e79b0bd4d1
1 file changed
+6 -2
+6 -2
View File
@@ -90,8 +90,10 @@ arWanIp6() {
if [ -z "$hostIp" ]; then
if type curl >/dev/null 2>&1; then
hostIp=$(curl -6 -s $arIp6QueryUrl)
else
elif ! wget --help 2>&1 | grep -qs BusyBox; then
hostIp=$(wget -6 -q -O- $arIp6QueryUrl)
else
hostIp=$(wget -q -O- $arIp6QueryUrl)
fi
fi
@@ -121,8 +123,10 @@ arDdnsApi() {
if type curl >/dev/null 2>&1; then
curl -4 -s -A $agent -d $params $dnsapi
else
elif ! wget --help 2>&1 | grep -qs BusyBox; then
wget -4 -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
else
wget -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
fi
}