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

@lsby/jdcloud-certbot-dns-hook

v0.0.5

Published

方便的对运行在京东云上的域名进行 certbot-dns 挑战。

Readme

jdcloud-certbot-dns-hook

方便的对运行在京东云上的域名进行 certbot-dns 挑战。

安装

npm i -g @lsby/jdcloud-certbot-dns-hook

使用

首先,请确保你要申请证书的主域名(例如 aaa.com)已经在你京东云账号的“域名解析”列表中。脚本会在运行中自动添加和清理所需的 DNS TXT 验证记录,无需你手动进行任何解析配置。

接下来安装 certbot。

接下来创建两个文件, windows和linux略有不同.

  • 文件后缀名不同, windows是.cmd.bat, linux是.sh.
  • 设置环境变量的写法不同, windows是set, linux是export.

下面的示例使用windows的写法:

auth.cmd:

set JDCLOUD_ACCESS_KEY_ID=<你的AK>
set JDCLOUD_ACCESS_KEY_SECRET=<你的SK>

lsby-jdcloud-certbot-dns-hook-auth

cleanup.cmd:

set JDCLOUD_ACCESS_KEY_ID=<你的AK>
set JDCLOUD_ACCESS_KEY_SECRET=<你的SK>

lsby-jdcloud-certbot-dns-hook-cleanup

最后执行命令:

根据你需要申请的证书类型,通过 -d 参数指定域名:

选项 1:申请单域名证书(例如只为 bbb.aaa.com 申请)

certbot certonly --manual --non-interactive --preferred-challenges=dns --manual-auth-hook <auth文件路径> --manual-cleanup-hook <cleanup文件路径> --agree-tos -m <邮箱> -d bbb.aaa.com

选项 2:申请泛域名证书(例如为 *.aaa.com 申请,可匹配该域名下所有子域)

certbot certonly --manual --non-interactive --preferred-challenges=dns --manual-auth-hook <auth文件路径> --manual-cleanup-hook <cleanup文件路径> --agree-tos -m <邮箱> -d "*.aaa.com" -d aaa.com

注意:

  1. 申请泛域名证书时,请务必像上方示例一样使用双引号包裹泛域名,以防止星号被命令行(如 shell)当作通配符错误解析。
  2. *.aaa.com 不包含 aaa.com,所以推荐像上方示例一样使用 -d "*.aaa.com" -d aaa.com
  • 执行后会卡住很久, 是正常的, 因为要等待dns传播. 现在设置的是等待一分钟.
  • 续期时重新执行以上命令即可.