找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1684|回复: 6

ros系统下怎么设置腾讯dnspod

[复制链接]
发表于 2021-3-5 22:52 | 显示全部楼层 |阅读模式
如题
请教一下 ros系统下怎么设置腾讯dnspod来解析自己的公网ip?
找了油管的视频 试了脚本跑不了  google也找不道
我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-3-7 09:08 | 显示全部楼层
也想知道,帮顶!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-3-13 23:14 | 显示全部楼层
要新版本的ros才可以的,旧版本不行的
:local pppoe "pppoe-out1"

#DNSPOD token
:local token "*****,*****"

#域名
:local domain "*****.com"

#域名主机名
:local subdomain "*****"

#以下不是专业人士请不要修改
#domain
:local dname ($subdomain.".".$domain)

#获取pppoe拨号ip
:local ipaddr [/ip address get [/ip address find interface=$pppoe] address]
:set ipaddr [:pick $ipaddr 0 ([len $ipaddr] -3)]

#获取域名列表
:local record [/tool fetch url="https://dnsapi.cn/Record.List" http-data="login_token=$token&format=json&domain=$domain&sub_domain=$subdomain&record_type=A" as-value output=user]

#获取id和ip
:set record ($record->"data")
:set record [:pick $record [:find $record "\"records\":"] [:len $record]]
:local recordid [:pick $record ([:find $record "\"id\":\""]+6) [:find $record "\",\"ttl"]]
:local recordip [:pick $record ([:find $record "\"value\":\""]+9) [:find $record "\",\"en"]]

#更新ip地址
:if ($recordip!=$ipaddr) do={
/tool fetch url="https://dnsapi.cn/Record.Ddns" http-data="login_token=$token&format=json&domain=$domain&sub_domain=$subdomain&record_id=$recordid&record_line_id=0&value=$ipaddr"
:log info ("[".$dname."] ip update")
} else={
:log info ("[".$dname."] ip not update")
}

点评

6.5的版本可以吗?  详情 回复 发表于 2021-4-15 22:48
虽然看不懂,还是谢谢大神的分享  详情 回复 发表于 2021-3-27 13:26

评分

参与人数 1恩山币 +1 收起 理由
lan*** + 1 强大的恩山!(以下重复1万次)

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-3-27 13:26 | 显示全部楼层
hakercai 发表于 2021-3-13 23:14
要新版本的ros才可以的,旧版本不行的
:local pppoe "pppoe-out1"

虽然看不懂,还是谢谢大神的分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-4-15 22:48 | 显示全部楼层
hakercai 发表于 2021-3-13 23:14
要新版本的ros才可以的,旧版本不行的
:local pppoe "pppoe-out1"

6.5的版本可以吗?

点评

都还没有6.5吧,看了一下是测试版6.49  详情 回复 发表于 2021-4-15 23:24
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-4-15 23:24 | 显示全部楼层
Ailee 发表于 2021-4-15 22:48
6.5的版本可以吗?

都还没有6.5吧,看了一下是测试版6.49

点评

恩 我看错了 反正先谢谢了  详情 回复 发表于 2021-4-16 21:26
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-4-16 21:26 | 显示全部楼层
hakercai 发表于 2021-4-15 23:24
都还没有6.5吧,看了一下是测试版6.49

恩 我看错了 反正先谢谢了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 18:43

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表