{"id":37311134,"url":"https://github.com/hamflx/ddns-aliyun","last_synced_at":"2026-01-16T03:00:48.053Z","repository":{"id":54475707,"uuid":"202504663","full_name":"hamflx/ddns-aliyun","owner":"hamflx","description":"基于阿里云 CLI 编写的一个 DDNS 工具。","archived":false,"fork":false,"pushed_at":"2020-03-10T08:03:36.000Z","size":47,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-04-29T15:11:08.909Z","etag":null,"topics":["ddns","ddns-client","ddns-daemon","ddns-script","ddns-updater"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamflx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T08:34:10.000Z","updated_at":"2022-08-08T02:55:11.000Z","dependencies_parsed_at":"2022-08-13T17:00:41.610Z","dependency_job_id":null,"html_url":"https://github.com/hamflx/ddns-aliyun","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/hamflx/ddns-aliyun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fddns-aliyun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fddns-aliyun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fddns-aliyun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fddns-aliyun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamflx","download_url":"https://codeload.github.com/hamflx/ddns-aliyun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamflx%2Fddns-aliyun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28476667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T00:15:39.755Z","status":"online","status_checked_at":"2026-01-16T02:00:07.781Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddns","ddns-client","ddns-daemon","ddns-script","ddns-updater"],"created_at":"2026-01-16T03:00:34.760Z","updated_at":"2026-01-16T03:00:48.022Z","avatar_url":"https://github.com/hamflx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddns-aliyun\n\n基于阿里云 CLI 实现的一个 DDNS 工具。\n\n## Features\n\n- 支持随系统引导自动启动（由 `systemd` 管理）\n- 支持定时查询公网 IP 地址并在变化时更新解析记录\n\n## Using\n\n**声明：由于本软件使用 root 权限运行，故务必按照步骤指示操作，若不按步骤指示操作所造成的一切后果皆自负！**\n\n**声明：本软件仅供学习参考之用，若将该软件用于生产环境时，请务必检查该软件的缺陷与安全性，否则所造成的一切后果自负！**\n\n1. 安装阿里云 CLI 到 `/usr/bin` 目录\n\n        curl -O https://aliyuncli.alicdn.com/aliyun-cli-linux-3.0.16-amd64.tgz\n        tar -zxf aliyun-cli-linux-3.0.16-amd64.tgz\n        sudo cp aliyun /usr/bin\n\n2. 安装依赖软件\n\n        sudo yum install -y jq\n\n3. 克隆项目并运行 `install.sh` 进行安装\n\n        git clone git@github.com:hamflx/ddns-aliyun.git\n        cd ddns-aliyun\n\n        # install.sh 将会把配置文件安装到此处指定的用户名 \u003cUSERNAME\u003e 家目录下\n        sudo ./install.sh install \u003cUSERNAME\u003e\n\n4. 配置 `~/.ddns/ddns.conf`\n\n    进入阿里云 accesskeys 管理页面，生成一个 `AccessKey`。\n\n    ![阿里云 accesskeys 管理页面入口](./assets/step1.png \"阿里云 accesskeys 管理页面入口\")\n\n    ![阿里云 accesskeys 管理页面](./assets/step2.png \"阿里云 accesskeys 管理页面\")\n\n    编辑 `~/.ddns/ddns.conf` 将 `ACCESS_KEY_ID` 与 `ACCESS_KEY_SECRET` 的值改为在阿里云上生成的 `AccessKey` 的 `AccessKey ID` 与 `Access Key Secret`：\n\n        sudo vim ~/.ddns/ddns.conf\n\n        # 找到下面两句，将 \u003cAccessKey ID\u003e 与 \u003cAccess Key Secret\u003e 修改为具体的值\n        # ACCESS_KEY_ID=\"\u003cAccessKey ID\u003e\"\n        # ACCESS_KEY_SECRET=\"\u003cAccess Key Secret\u003e\"\n\n    修改 `RECORD_RR` 的值为需要解析的记录，`RECORD_DOMAIN` 顶级域名：\n\n        # 需要操作的域名\n        RECORD_RR=\"www\"\n        RECORD_DOMAIN=\"njstee.com\"\n\n5. 添加域名\n\n    在阿里云控制台添加需要解析的域名记录，值为任意即可，在启动软件后会自动获取公网 IP 并进行设置。\n\n    ![解析记录](./assets/record.png \"解析记录\")\n\n6. 启动 ddns-aliyun\n\n    启动 ddns-aliyun 进行测试，若提示 `Updated successfully` 或 `Already latest` 则表示运行成功：\n\n        # 测试成功后，按 ^C 终止\n        ddns.sh\n\n    启动 ddns-aliyun 并将其设置为随系统引导一起启动：\n\n        # 将 \u003cUSERNAME\u003e 替换为此前运行 install.sh 时指定的用户名\n        sudo systemctl enable --now ddns@\u003cUSERNAME\u003e.service\n\n## License\n\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square)](https://github.com/hamflx/ddns-aliyun/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamflx%2Fddns-aliyun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamflx%2Fddns-aliyun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamflx%2Fddns-aliyun/lists"}