3322动态域名脚本(支持单线和多线)转自大河'Blog--博主:郑州-海风
:local ddnsname:local ddnsuser
:local ddnspsd
:local ddnsinterface interface]
:local ddnsip [ /ip address get address]
:local ddnsip [:pick $ddnsip 0 [:find $ddnsip "/"]]
:if ($ddnsip =[:resolve $ddnsname]) do={
:log info "ddns:No change"
} else={
:local urlstr ("http://members.3322.org/dyndns/update\?system=dyndns&hostname=" . $ddnsname . "&myip=" . $ddnsip)
/tool fetch url=$urlstr mode=http user=$ddnsuser password=$ddnspsd dst-path=$ddnsname
:delay 3
:local result
:log info ($ddnsname . " " . $result)
/file remove $ddnsname}
备注:上述脚本中comment="def",是在多线有多条缺省网关时,给各个缺省网关加的备注,单线的可以不要此备注。
转自大河'Blog--博主:郑州-海风http://ewangsoft.blog.163.com/blog/static/772155822011915038977/
谢谢楼主分享
页:
[1]