Skip to main content

Certbot DNS EdgeOne (TEO) 插件

通过腾讯云 EdgeOne API 完成 Certbot DNS-01 验证,支持普通域名和泛域名。

站点必须已通过 NS 模式接入 EdgeOne,并完成权威 DNS 服务器切换。CNAME 接入、DNSPod 托管接入及 Pages 站点请使用实际权威 DNS 服务商的插件;本插件不会修改 DNSPod。

功能特性

  • 自动管理 EdgeOne TXT 验证记录
  • 自动匹配所属站点,支持国际化域名(IDN)
  • 支持同名多个 TXT 验证值,仅删除本次创建的记录,保留已有记录
  • 支持临时凭证,可指定站点 ID 解决同名站点歧义
  • 支持 Certbot 3/4/5,Python 3.9–3.15

Python 3.9 使用 Certbot 3/4(Certbot 4.2 起要求 Python ≥3.9.2);Python 3.14–3.15 使用 Certbot 4/5。 Certbot 3 环境需额外安装 pyopenssl<25。

安装

在本仓库目录安装,插件和 Certbot 必须处于同一个 Python 环境:

python3 -m pip install .
# 或使用 uv 创建独立工具环境
uv tool install --with . 'certbot>=5,<6'

也可安装兼容包 certbot-dns-tencent-edgeone,它依赖同版本的 certbot-dns-teo,共用实现和插件入口。在仓库根目录同时安装两个本地项目:

python3 -m pip install . ./packages/certbot-dns-tencent-edgeone

两个包发布到 PyPI 后,也可用 python3 -m pip install certbot-dns-tencent-edgeone 安装。 使用任一包时,认证器均为 dns-teo,命令行参数和凭证前缀均保持 dns-teo- / dns_teo_。

配置文件

保存为 ~/teo.ini:

dns_teo_secret_id = YOUR_SECRET_ID
dns_teo_secret_key = YOUR_SECRET_KEY
# 使用临时凭证时填写
# dns_teo_token = YOUR_SESSION_TOKEN
# 可选:仅允许操作指定的 NS 站点,同名站点有歧义时必须指定
# dns_teo_zone_id = zone-xxxxxxxxxxxx
chmod 600 ~/teo.ini

运行

certbot certonly \
  --authenticator dns-teo \
  --dns-teo-credentials ~/teo.ini \
  --dns-teo-propagation-seconds 30 \
  -d example.com \
  -d '*.example.com'

TXT TTL 默认 600 秒,可用 --dns-teo-ttl 设置为 60–86400 秒。 传播等待默认 30 秒,由 Certbot 在所有挑战记录创建后统一执行;如 DNS 尚未生效,可增加 --dns-teo-propagation-seconds。 成功签发后可用 certbot renew 续期,Certbot 会保存认证器和凭证路径。

腾讯云权限配置

SecretId / SecretKey 所属账号需要以下操作权限(CAM 自定义策略):

{
  "version": "2.0",
  "statement": [{
    "effect": "allow",
    "action": [
      "teo:DescribeZones",
      "teo:DescribeDnsRecords",
      "teo:CreateDnsRecord",
      "teo:DeleteDnsRecords"
    ],
    "resource": ["*"]
  }]
}

使用公共端点 teo.tencentcloudapi.com,不需要配置 Region。 指定 dns_teo_zone_id 后仍需 DescribeZones 权限,以校验域名范围和 NS 接入状态。

Metadata

Release files for certbot-dns-teo 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for certbot-dns-teo 1.0.1
File Size Uploaded Provenance Actions
certbot_dns_teo-1.0.1.tar.gz 139.3 kB With provenance Details for certbot_dns_teo-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for certbot-dns-teo 1.0.1
File Interpreter ABI Platform Actions
certbot_dns_teo-1.0.1-py3-none-any.whl Python 3 none any Details for certbot_dns_teo-1.0.1-py3-none-any.whl

Total release size: 148.7 kB

Release files / certbot_dns_teo-1.0.1.tar.gz

Download URL certbot_dns_teo-1.0.1.tar.gz
Size 139.3 kB
Tags Source
SHA-256 checksum
How to use checksums
868be110899371ad4c472827678cfa449ad9097c95efd3faa9aed13c031d2f1c
BLAKE2b-256 checksum
How to use checksums
fdd263a84c5ce970a52a64ce98194349ed3ac6838a3a9b5a5e67dcc838817792
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / certbot_dns_teo-1.0.1-py3-none-any.whl

Download URL certbot_dns_teo-1.0.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24437fbedc2fa55aa742661f4bf5b7056182b8eab22a32b72e51b39fec1d20f8
BLAKE2b-256 checksum
How to use checksums
670ac39a62966f877e18669f048db632393a946738ed44b08ca4e6bded422bc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for certbot-dns-teo 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for certbot_dns_teo-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page