强化获取IP结果检测

This commit is contained in:
若海 committed 2021-03-03 10:53:33 +08:00
1 parent ba3a2a49c6
commit db88bc27d8
3 files changed
+14 -3

No files matched your search

+1
View File
@@ -30,6 +30,7 @@ Updating Record for test.rehi.org
2021/3/3
- 强化获取IP结果检测
- 优化部分判断逻辑
- 优化消息输出
+10
View File
@@ -49,6 +49,11 @@ arWanIp4() {
fi
fi
if [ -z "$hostIp" ]; then
echo "arWanIp4 - Can't get ip address"
return 1
fi
if [ -n "$(echo $hostIp | grep -Ev '^[0-9\.]+$')" ]; then
echo "arWanIp4 - Invalid ip address $hostIp"
return 1
@@ -75,6 +80,11 @@ arWanIp6() {
;;
esac
if [ -z "$hostIp" ]; then
echo "arWanIp6 - Can't get ip address"
return 1
fi
if [ -n "$(echo $hostIp | grep -Ev '^[0-9a-fA-F:]+$')" ]; then
echo "arWanIp6 - Invalid ip address"
return 1
+3 -3
View File
@@ -10,8 +10,8 @@ arToken="12345,7676f344eaeaea9074c123451234512d"
# Place each domain you want to check as follows
# you can have multiple arDdnsCheck blocks
# IPv6:
arDdnsCheck "test.org" "subdomain6" 6
# IPv4:
arDdnsCheck "test.org" "subdomain"
# IPv6:
arDdnsCheck "test.org" "subdomain6" 6