以 dockdns 为例,必须安装 Merlin 固件。

1
vi /jffs/scripts/ddns-start
1
2
3
4
5
6
7
8
9
10
11
# register a subdomain at https://www.duckdns.org/ to get your token
SUBDOMAIN="your_subdomain"
TOKEN="your-token"

# no modification below needed
curl --silent "https://www.duckdns.org/update?domains=$SUBDOMAIN&token=$TOKEN&ip=$1" >/dev/null 2>&1
if [ $? -eq 0 ];
then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
1
chmod a+rx /jffs/scripts/*

并在 web 设置中 Administration -> System 启用用户脚本,在 WAN -> DDNS -> DDNS Service 中设置为custom 即可。