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 🙏

© 2024 – Pkg Stats / Ryan Hefner

aliyun-ddns-updater

v1.0.1

Published

A DDNS client for Aliyun's DNS service.

Downloads

8

Readme

Aliyun DDNS Updater

npm version

A DDNS client for Aliyun's DNS service. It will look for the device's public IP addresses and update the DNS record with Aliyun's API.

Usage

Install:

npm install -g aliyun-ddns-updater

Then run:

DOMAIN=example.com \
SUB_DOMAIN=ddns \
AK_ID=(accessKeyId) \
AK_SECRET=(accessKeySecret) \
CRON="0 * * * *" \
aliyun-ddns-updater

Or, with Docker:

docker run -d \
    --name aliyun-ddns-updater \
    -e DOMAIN=example.com \
    -e SUB_DOMAIN=ddns \
    -e AK_ID=(accessKeyId) \
    -e AK_SECRET=(accessKeySecret) \
    -e CRON="0 * * * *" \
    --restart unless-stopped \
    hehongbo/aliyun-ddns-updater

The application will look for IP addresses through a public lookup service (by default is https://bot.whatismyipaddress.com), so you don't need to create the container with a host network.

More Options

  1. IPv6?
    Yes, with environment variable UPDATE_V6 set to ENABLED, or ONLY if you are using a single v6 stack and updates only AAAA record.
  2. Update top-level record?
    Just leave the SUB_DOMAIN environment variable unset. You don't need to pass an @ to update the top-level record.
  3. Detecting IP address with a different lookup service?
    Specify it with an IP_LOOKUP_SERVICE environment variable. Note that the application expects a plain address without JSON enclosures or statements like "Your IP address is:", and assumes that the entire response body is the address.
  4. One-shot?
    Yes, just remove the CRON environment variable, and it will run only once. That would be helpful if you want to run the application with an external scheduler like Systemd timer. Also, remember to replace the restart policy with something like --rm if you want to run it with Docker before the Docker engine tries to restart it infinitely forever.
  5. Timezone?
    Could be set with a TIMEZONE environment. That would affect cron expressions with a specified hour or day. The log output's timestamp will also be affected by this. See Moment Timezone for more information.

All Environment variables

| Variable | Required | Description | Default | |:--------------------|:---------|:----------------------------------------------------------------------------------------------------------|:------------------------------------| | DOMAIN | YES | The domain (top-level part) to update. | | | SUB_DOMAIN | | The subdomain to update. Leave unset to update the top-level domain. | | | AK_ID | YES | Aliyun's accessKeyId. | | | AK_SECRET | YES | Aliyun's accessKeySecret. | | | UPDATE_V6 | | Update the AAAA record with your IPv6 address. Set to ENABLED if needed, or ONLY to update only IPv6. | | | CRON | | Cron expression to control the timing of update tasks. | | | TIMEZONE | | In which timezone should the application executing the cron task. | Etc/UTC | | IP_LOOKUP_SERVICE | | The URL of IP lookup service. | https://bot.whatismyipaddress.com | | IP_LOOKUP_TIMEOUT | | Maximum time to wait (in millisecond) for the lookup service return an IP address. | 3000 |