Merge pull request #110 from Vigilans/vigilans/ipv6-query-url
Allow url for querying public ipv6 address to be configurable
This commit is contained in:
2 files changed
+12
-2
No files matched your search
@@ -24,6 +24,12 @@ if ! type arLog >/dev/null 2>&1; then
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The url to be used for querying public ipv6 address. We set a default here.
|
||||||
|
|
||||||
|
if [ -z "$arIp6QueryUrl" ]; then
|
||||||
|
arIp6QueryUrl="https://6.ipw.cn"
|
||||||
|
fi
|
||||||
|
|
||||||
# The error code to return when a ddns record is not changed
|
# The error code to return when a ddns record is not changed
|
||||||
|
|
||||||
if [ -z "$arErrCodeUnchanged" ]; then
|
if [ -z "$arErrCodeUnchanged" ]; then
|
||||||
@@ -83,9 +89,9 @@ arWanIp6() {
|
|||||||
|
|
||||||
if [ -z "$hostIp" ]; then
|
if [ -z "$hostIp" ]; then
|
||||||
if type curl >/dev/null 2>&1; then
|
if type curl >/dev/null 2>&1; then
|
||||||
hostIp=$(curl -s 6.ipw.cn)
|
hostIp=$(curl -6 -s $arIp6QueryUrl)
|
||||||
else
|
else
|
||||||
hostIp=$(wget -q -O- 6.ipw.cn)
|
hostIp=$(wget -6 -q -O- $arIp6QueryUrl)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
# Combine your token ID and token together as follows
|
# Combine your token ID and token together as follows
|
||||||
arToken="12345,7676f344eaeaea9074c123451234512d"
|
arToken="12345,7676f344eaeaea9074c123451234512d"
|
||||||
|
|
||||||
|
# Web endpoint to be used for querying the public IPv6 address
|
||||||
|
# Set this to override the default url provided by ardnspod
|
||||||
|
# arIp6QueryUrl="https://6.ipw.cn"
|
||||||
|
|
||||||
# Return code when the last record IP is same as current host IP
|
# Return code when the last record IP is same as current host IP
|
||||||
# Set this to a value other than 0 to distinguish with a successful ddns update
|
# Set this to a value other than 0 to distinguish with a successful ddns update
|
||||||
# arErrCodeUnchanged=0
|
# arErrCodeUnchanged=0
|
||||||
|
|||||||
Reference in new issue
Block a user