Cloudflare域名解析突然失效解决过程

从dnspod换到了Cloudflare,解析一直很正常,但今天突然连不上;查看路由器日志,发现获取的乱七八糟的ip地址,而且每次不一样;经过思考,觉得可能是获取的网址问题(可能改版什么的情况)

局域网登录路由器(广域网登录修改不了的),点击花生壳内网版->cloudflare->cloudflare脚本-基于cloudflare用户API实现的纯Shell动态域名客户端

if [ -z "$curltest" ] || [ ! -s "`which curl`" ] ; then
    #wget --no-check-certificate --quiet --output-document=- "https://www.ipip.net" | grep "您当前的IP:" | grep -E -o '([0-9]+\.){3}[0-9]+'
    #wget --no-check-certificate --quiet --output-document=- "http://members.3322.org/dyndns/getip" | grep -E -o '([0-9]+\.){3}[0-9]+'
    #wget --no-check-certificate --quiet --output-document=- "ip.6655.com/ip.aspx" | grep -E -o '([0-9]+\.){3}[0-9]+'
    wget --no-check-certificate --quiet --output-document=- "ip.3322.net" | grep -E -o '([0-9]+\.){3}[0-9]+'
else
    #curl -L -k -s "https://www.ipip.net" | grep "您当前的IP:" | grep -E -o '([0-9]+\.){3}[0-9]+'
    #curl -k -s "http://members.3322.org/dyndns/getip" | grep -E -o '([0-9]+\.){3}[0-9]+'
    #curl -k -s ip.6655.com/ip.aspx | grep -E -o '([0-9]+\.){3}[0-9]+'
    curl -k -s ip.3322.net | grep -E -o '([0-9]+\.){3}[0-9]+'
fi
}

注释掉www.ipip.net行代码,使用ip.3322.net获取ip地址,修改后耐心等待会就正常了

添加新评论

评论列表