# 公益域名之家ddns脚本 **Repository Path**: xiao-yang222/public-domain-ddns-script ## Basic Information - **Project Name**: 公益域名之家ddns脚本 - **Description**: 公益域名之家自动ddns更新的脚本 - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 1 - **Created**: 2025-04-05 - **Last Updated**: 2025-11-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🛰️ Public Domain DDNS Script 一个轻量级、纯 Shell 的 DDNS 动态域名更新脚本,专为 [freedns.fun](https://freedns.fun) 平台设计,无需 Python 或其他依赖,适用于任意 Linux 系统。 --- ## ✅ 一键安装 ```bash git clone https://gitee.com/xiao-yang222/public-domain-ddns-script.git cd public-domain-ddns-script chmod +x install.sh sudo ./install.sh ``` --- ## ⚙️ 配置参数 安装完成后,编辑配置文件: ```bash sudo vim /etc/ddns/config.conf ``` 将其中内容修改为你自己的参数: ```bash RECORD_ID=你的记录ID KEY_ID=你的KeyID TOKEN=你的Token ``` 这些值来自你在 https://freedns.fun/apapap/user/admin/ddns.html 页面设置生成的参数。 --- ## 🧪 手动运行(调试用) ```bash ddns ``` 日志默认输出至终端: `cat /var/log/ddns.log`。 --- ## 🔁 启用自动更新(每分钟检测 IP) 安装时已经自动开启每分钟更新 > ✅ 脚本会自动缓存上一次 IP,仅在公网 IP 发生变化时才会调用接口,避免频繁请求。 --- ## ❌ 卸载方法 如果你不再使用 DDNS 功能,可以使用以下命令进行卸载: ```bash cd public-domain-ddns-script chmod +x uninstall.sh sudo ./uninstall.sh ``` --- ## 📦 文件说明 | 文件名 | 说明 | |---------------|-------------------------------| | `ddns.sh` | 核心更新逻辑脚本 | | `install.sh` | 一键安装脚本(安装 + 配置) | | `config.conf` | 用户参数配置文件模板 | | `README.md` | 本说明文档 | --- ## 🪪 许可证 MIT License - 免费使用,无需署名,欢迎贡献! --- ## 💬 问题反馈 欢迎在 Gitee 提 Issue 交流问题和建议:https://gitee.com/xiao-yang222/public-domain-ddns-script/issues ---