国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Ros腳本-更新cloudflare域名

2023-08-11 00:01 作者:stan1  | 我要投稿

:local apiKey "yourapikey"

:local zoneID "yourzoneID"

:local domainName "yourdomainame"

:local ttl "600"

#設(shè)置撥號的網(wǎng)絡(luò)名

:local inf "pppoe-out1"


:local recordID ""

#自動獲取cloudflare域名id

:local result [/tool fetch mode=https url="https://api.cloudflare.com/client/v4/zones/$zoneID/dns_records/?name=$domainName" http-method=get http-header="Authorization: Bearer $apiKey" as-value output=user];

:if ($result->"status"= "finished") do={

#:log info $result->"data"->"result"->"id"

:set result [:pick $result 0 ]

:set recordID [:pick $result ([:find $result "\"id\":\""]+6) ([:find $result "\",\"zone_id"])]

:log info $recordID

} else={

:log info "獲取域名id失敗"

}

# Do not edit below

# 原腳本檢查出口ip,然后新舊ip對比,如果不同再更新,按需使用吧

#:local currentIP ([/tool fetch url="https://ifconfig.me/ip" mode=https output=user as-value]->"data")

#:local cloudflareDNSIP [:resolve $domainName server=1.1.1.1];

:local currentIP ""

:set currentIP [/ip address get [/ip address find interface=$inf] address]

:set currentIP [:pick $currentIP 0 ([len $currentIP] -3)]



:if ($currentIP != $cloudflareDNSIP) do={

? # If the IP has changed, update the Cloudflare record

? :log info ("Updating Cloudflare record.? New IP: " . $currentIP);

? :local payload ("{\"type\":\"A\",\"name\":\"" . $domainName . "\",\"content\":\"" . $currentIP . "\",\"ttl\":" . $ttl .",\"proxied\":false}")


? /tool fetch mode=https url="https://api.cloudflare.com/client/v4/zones/$zoneID/dns_records/$recordID" http-method=put http-header="Authorization: Bearer $apiKey"? http-data=$payload output=none;

}


Ros腳本-更新cloudflare域名的評論 (共 條)

分享到微博請遵守國家法律
论坛| 崇礼县| 蛟河市| 手机| 会宁县| 通州区| 江都市| 阜城县| 沅陵县| 田阳县| 吉木萨尔县| 剑河县| 运城市| 长海县| 珲春市| 荥经县| 申扎县| 新竹市| 乌恰县| 基隆市| 石泉县| 张北县| 马边| 宜兰市| 渑池县| 彰化县| 霍山县| 普兰县| 繁峙县| 大宁县| 武宁县| 竹山县| 安国市| 冷水江市| 西安市| 克山县| 义马市| 沙湾县| 洛宁县| 陇西县| 桂阳县|