Giter Site home page Giter Site logo

ddns-scripts-dnspod's Introduction

适用于 OpenWrt 官方 DDNS 客户端 的腾讯云(DNSPod)DDNS 动态域名更新插件,使用全新的 腾讯云 API 3.0 接口,支持 IPv6,支持多 IP 记录值。

安装

  1. 安装 OpenWrt 官方 DDNS 客户端和依赖包:
    opkg install luci-app-ddns bind-host curl openssl-util
  2. 下载最新的插件包:
    https://github.com/starsunyzl/ddns-scripts-dnspod/archive/refs/heads/main.zip
  3. 将插件包中的 usr 目录上传到 OpenWrt 根目录 /
  4. 设置执行权限:
    chmod 755 /usr/lib/ddns/update_dnspod.sh
  5. 重启 OpenWrt

后续再提供 ipk 安装包。

使用

以原版 OpenWrt 为例,登录 OpenWrt 后台管理页面,导航到 Services / Dynamic DNS 页面,点击 Add new services 添加服务,IPv4 和 IPv6 需要分别添加服务,DDNS Service provider 选择 dnspod(通常在列表末尾),Create service 后填写如下 Basic Settings 项:

  • Lookup Hostname:完整域名,用于检测对应的 IP 是否需要更新。例:www.example.comexample.com
  • Domain:要更新的 主机记录@主域名,例:[email protected],省略 主机记录 则更新 主域名,例:@example.comexample.com
  • Username:你的腾讯云用户 API 密钥 SecretId
  • Password:你的腾讯云用户 API 密钥 SecretKey
  • Optional Encoded Parameter:选填,要更新的记录 RecordId,不填则自动获取。当一个主机记录有多个记录类型相同的 IP 记录值时,必须填写此项指定要更新哪一条记录。可在 Log File Viewer 中查看所有记录的 RecordId(需要设置 OpenWrt 系统日志输出级别为 Debug 并运行一遍插件)

其他项如代理、更新间隔时间等根据自身需求填写,使用 IPv6 时需要在 Advanced Settings / Network 选择对应的网络接口。

腾讯云 API 3.0 使用了更安全、更严格的签名认证方式,要求 OpenWrt 系统时间和标准时间的误差不能超过 5 分钟,否则会认证失败。

当一个主机记录有多个记录类型相同的 IP 记录值时,官方 DDNS 客户端只检测和显示第一条 IP 记录值,这可能与你设置的 RecordId 对应的 IP 记录值不同,不必理会,插件会正确检测 RecordId 对应的 IP 记录值,当已经是最新时不会再更新。

在原版 OpenWrt 21.02.x 上测试正常,其他版本未测试。

作者

starsunyzl

ddns-scripts-dnspod's People

Contributors

starsunyzl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

king-of-knights

ddns-scripts-dnspod's Issues

出现如下错误提示该如何解决?

101530 : DescribeRecordList answered:
{"Response":{"Error":{"Code":"AuthFailure.SecretIdNotFound","Message":"The SecretId is not found, please ensure that your SecretId is correct."},"RequestId":"4474675b-d2c8-4b53-9600-78573b72effb"}}
101530 ERROR : IP update not accepted by DDNS Provider

我使用的是腾讯云DNSPod,路由器是OpenWRT 22.03.3,动态 DNS 版本 2.8.2-33。
SecretId是什么?和DNSPod上创建密钥时的ID不是一个吗?

脚本提示curl不支持https

安装设置脚本后运行出错,以下是log

 213549       : parsing script '/usr/lib/ddns/update_dnspod.sh'
 213550 ERROR : cURL: libcurl compiled without https support - TERMINATE
 213550  WARN : PID '14688' exit WITH ERROR '1' at 2022-10-26 21:35
root@OpenWrt:/tmp/log/ddns# curl -V
curl 7.85.0 (x86_64-openwrt-linux-gnu) libcurl/7.85.0 OpenSSL/1.1.1q
Release-Date: 2022-08-31
Protocols: file ftp ftps http https mqtt 
Features: alt-svc HSTS HTTPS-proxy IPv6 Largefile SSL threadsafe

lean源码自编译x86_64版本
固件版本 OpenWrt R22.10.20 / LuCI Master (git-22.289.58375-2a380a3)
内核版本 5.15.74

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.