分享一個使用Cloudflare API v4的動態dns腳本(Gist地址或本地下載)。
因為11月Cloudflare就要下線v1版本的API了,而Openwrt里的ddns-scripts並沒有支持新版,所以自己寫了一個。
僅依賴curl(可以改成wget)。支持v4和v6。會請求ip.yooooo.us得到公網IP地址,怕隱私泄露的可以自己搭一個。
This is a DDNS script using Cloudflare APIv4 written in bash (Gist or Download directly).
I wrote this because Cloudflare is going to remove support for the old API on Nov. this year. And the ddns-scripts package in Openwrt is not yet supporting the new API .
This script only depends on curl (can be modified to use wget). It will use ip.yooooo.us to query IPv4 and IPv6. You can use this link to set up your own query server.