花生壳更新脚本:
local ipaddr
local server “http://ddns.oray.com”
local domain “你的域名”
local par “/ph/update?&hostname=$domain&myip=$ipaddr”
local users “花生壳护照”
local paswd “护照密码”
:set ipaddr [/ip address get [/ip address find interface=接口名称] address]
:set ipaddr [:pick $ipaddr 0 ([len $ipaddr] -3)]
/tool fetch url=($server . $par) mode=http user=$users password=$paswd
3322更新脚本:
:local ednsuser “3322用户名”
:local ednspass “3322密码”
:local ednshost “你的域名”
:local ednsinterface “接口名称”
:local members “http://members.3322.org/dyndns/update?system=dyndns”
#:local members “http://members.dyndns.org/nic/update?”
:local status
:local status [/interface get [/interface find name=$ednsinterface] running]
:if ($status!=false) do={
:local ednslastip [:resolve $ednshost]
:if ([ :typeof $ednslastip ] = nil ) do={ :local ednslastip “0” }
:local ednsiph [ /ip address get [/ip address find interface=$ednsinterface ] address ]
:local ednsip [:pick $ednsiph 0 [:find $ednsiph “/”]]
:local ednsstr “&hostname=$ednshost&myip=$ednsip”
:if ($ednslastip != $ednsip) do={
/tool fetch url=($members . $ednsstr) mode=http user=$ednsuser password=$ednspass dst-path=$ednshost
:delay 2
:local result [/file get $ednshost contents]
:log info ($ednshost . ” ” .$result)
/file remove $ednshost ;
}
}
changeip更新脚本:
/tool dns-update address=”127.0.0.255″ name=你的域名 key-name=用户名 key=密码