npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aliyun-dns-ddns

v1.0.1

Published

阿里云动态DNS自动更新库

Readme

阿里云动态DNS自动更新库 aliyun-dns-ddns

这是一个使用 TypeScript 编写的动态DNS(DDNS)自动更新库,基于阿里云新版SDK @alicloud/alidns20150109 实现。它可以定时检测当前公网IP地址,并自动更新阿里云DNS解析记录,适合用于公网IP经常变化的场景。


功能特点

  • 使用阿里云官方新版SDK,支持TypeScript,类型安全。
  • 通过访问 https://myip.ipip.net 获取当前公网IP,支持国内访问。
  • 支持更新主域名(根域名)或任意子域名的A记录。
  • 使用 node-schedule 实现定时任务,每小时自动检测并更新IP。
  • 详细的日志输出,方便调试和监控。

环境要求

  • Node.js 16 及以上版本
  • npm 包管理器

安装

npm install aliyun-dns-ddns

使用示例

import { AliyunDDNS } from 'aliyun-dns-ddns';

const ddns = new AliyunDDNS(
  '你的AccessKeyId',
  '你的AccessKeySecret',
  '你的域名',
  'A', // 记录类型
  '@', // 主域名用 '@',子域名用对应的名称
  'cn-hangzhou' // 地域ID
);

// 启动定时任务,默认每小时执行一次
// 你也可以传入自定义的Cron表达式
// ddns.startSchedule('*/5 * * * *'); // 每5分钟执行一次

ddns.startSchedule();

反馈与支持

如果您在使用过程中遇到任何问题,或者有功能建议,欢迎通过GitHub Issues提交反馈。 我们会尽快处理并持续改进。感谢您的支持!

项目地址: https://github.com/ArvZhou/aliyun-ddns


注意事项

  • 请确保您的阿里云账号有操作DNS的权限。
  • 请确保服务器可以访问 https://myip.ipip.net 以获取公网IP。
  • 如果需要更改定时任务频率,请调用 startSchedule 方法时传入自定义的 Cron 表达式。

许可证

MIT


如果您有任何问题或建议,欢迎反馈!