Compare commits
6
Commits
d3ba691d01
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff82455b57 | ||
|
|
f6a7b7df7e | ||
|
|
6b8af890a9 | ||
|
|
afb27e3a75 | ||
|
|
6d37d801f5 | ||
|
|
76ab34b92a |
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
- IPv4 优先适配网卡地址,无法获得合法外网地址则使用`DNSPod`接口自动更新
|
||||
- IPv6 优先适配网卡地址,无法获得合法外网地址则从*第三方*接口获取地址
|
||||
- IP地址接口项目源码参见 https://github.com/rehiy/docker-geoip-api
|
||||
|
||||
**官方DDNS接口已支持设置IPv6,如有兼容问题请使用`v6.1`分支版本**
|
||||
|
||||
@@ -37,7 +38,7 @@ echo "arDdnsCheck test.org subdomain" >> ./ardnspod
|
||||
|
||||
# 最近更新
|
||||
|
||||
2022/12/24
|
||||
2022/11/24
|
||||
|
||||
- 支持指定网卡
|
||||
- 增加 arRequest 方法,实现 curl/wget 封装
|
||||
|
||||
@@ -83,13 +83,18 @@ arLanIp4() {
|
||||
|
||||
local lanIps="^$"
|
||||
|
||||
lanIps="$lanIps|(^10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)"
|
||||
lanIps="$lanIps|(^127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)"
|
||||
lanIps="$lanIps|(^169\.254\.[0-9]{1,3}\.[0-9]{1,3}$)"
|
||||
lanIps="$lanIps|(^172\.(1[6-9]|2[0-9]|3[0-1])\.[0-9]{1,3}\.[0-9]{1,3}$)"
|
||||
lanIps="$lanIps|(^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$)"
|
||||
lanIps="$lanIps|(^100\.(6[4-9]|[7-9][0-9])\.[0-9]{1,3}\.[0-9]{1,3}$)" # 100.64.x.x - 100.99.x.x
|
||||
lanIps="$lanIps|(^100\.1([0-1][0-9]|2[0-7])\.[0-9]{1,3}\.[0-9]{1,3}$)" # 100.100.x.x - 100.127.x.x
|
||||
lanIps="$lanIps|(^10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC1918
|
||||
lanIps="$lanIps|(^100\.(6[4-9]|[7-9][0-9])\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC6598 100.64.x.x - 100.99.x.x
|
||||
lanIps="$lanIps|(^100\.1([0-1][0-9]|2[0-7])\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC6598 100.100.x.x - 100.127.x.x
|
||||
lanIps="$lanIps|(^127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC1122
|
||||
lanIps="$lanIps|(^169\.254\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC3927
|
||||
lanIps="$lanIps|(^172\.(1[6-9]|2[0-9]|3[0-1])\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC1918
|
||||
lanIps="$lanIps|(^192\.0\.2\.[0-9]{1,3}$)" # RFC5737
|
||||
lanIps="$lanIps|(^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC1918
|
||||
lanIps="$lanIps|(^198\.1[8-9]\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC2544
|
||||
lanIps="$lanIps|(^198\.51\.100\.[0-9]{1,3}$)" # RFC5737
|
||||
lanIps="$lanIps|(^203\.0\.113\.[0-9]{1,3}$)" # RFC5737
|
||||
lanIps="$lanIps|(^2[4-5][0-9]\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)" # RFC1112
|
||||
|
||||
echo $lanIps
|
||||
|
||||
@@ -160,9 +165,13 @@ arLanIp6() {
|
||||
|
||||
local lanIps="(^$)"
|
||||
|
||||
lanIps="$lanIps|(^::1$)"
|
||||
lanIps="$lanIps|(^[fF][eE][8-9a-fA-F])" # Link-local addresses
|
||||
lanIps="$lanIps|(^[fF][cdCD])" # Unique local addresses
|
||||
lanIps="$lanIps|(^::1$)" # RFC4291
|
||||
lanIps="$lanIps|(^64:[fF][fF]9[bB]:)" # RFC6052, RFC8215
|
||||
lanIps="$lanIps|(^100::)" # RFC6666
|
||||
lanIps="$lanIps|(^2001:2:0?:)" # RFC5180
|
||||
lanIps="$lanIps|(^2001:[dD][bB]8:)" # RFC3849
|
||||
lanIps="$lanIps|(^[fF][cdCD][0-9a-fA-F]{2}:)" # RFC4193 Unique local addresses
|
||||
lanIps="$lanIps|(^[fF][eE][8-9a-bA-B][0-9a-fA-F]:)" # RFC4291 Link-local addresses
|
||||
|
||||
echo $lanIps
|
||||
|
||||
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
#
|
||||
|
||||
# Import ardnspod functions
|
||||
. /your_real_path/ardnspod
|
||||
. /root/dnspod-shell/ardnspod
|
||||
|
||||
# Combine your token ID and token together as follows
|
||||
arToken="12345,7676f344eaeaea9074c123451234512d"
|
||||
arToken="411977,7471675f38efb5bf166169787ef47fbe"
|
||||
|
||||
# Web endpoint to be used for querying the public IPv6 address
|
||||
# Set this to override the default url provided by ardnspod
|
||||
@@ -19,7 +19,7 @@ arToken="12345,7676f344eaeaea9074c123451234512d"
|
||||
# you can have multiple arDdnsCheck blocks
|
||||
|
||||
# IPv4:
|
||||
arDdnsCheck "test.org" "subdomain"
|
||||
# arDdnsCheck "uugo.site" "tnas"
|
||||
|
||||
# IPv6:
|
||||
arDdnsCheck "test.org" "subdomain6" 6
|
||||
arDdnsCheck "uugo.site" "pve" 6
|
||||
Reference in new issue
Block a user