Compare commits

...
6 Commits
Author SHA1 Message Date
root ff82455b57 添加ddns配置 2023-05-15 00:13:47 +08:00
rehiy f6a7b7df7e Merge pull request #129 from genezx/extralanip
增加部分内网IP段和RFC来源
2023-03-10 16:20:49 +08:00
zx 6b8af890a9 增加部分内网IP段和RFC来源 2023-03-10 14:59:31 +08:00
rehiy afb27e3a75 Update README.md 2023-02-10 22:28:29 +08:00
若海 6d37d801f5 Merge branch 'master' of github.com:rehiy/dnspod-shell 2023-01-31 13:34:12 +08:00
rehiy 76ab34b92a Update README.md 2022-11-29 22:43:15 +08:00
3 changed files with 25 additions and 15 deletions

No files matched your search

+2 -1
View File
@@ -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 封装
+19 -10
View File
@@ -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
View File
@@ -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