【ROS】VPN地址不能输入域名

####PS:5.x的VPN不能输入域名,即使输入域名也会变成IP,如果域名对应IP发生变化,你的VPN就连不上了,现在免费放出脚本给那些不想升级6.x的用户。


:local ipadds [/interface pptp-client get value-name=connect-to [find interface="pptp-out1"] ] 


:local ipadd  [:resolve jimystry.f3322.net]


:if ($ipadd !=$ipadds)  do {


:delay 1000ms


/interface pptp-client set [find name="pptp-out1"] connect-to=$ipadd


:log warning  "地址变化,已修正VPN连接IP"


}