Compare commits

...

10 Commits

Author SHA1 Message Date
c3cb94dac2 Initial commit: Add DNSPod plugin for Certbot 2025-03-25 22:36:53 +08:00
tengattack
1991d81779 Bump version to 0.24.2 2024-03-25 03:53:26 +08:00
Alex Zorin
91f28a82e0 remove zope 2024-03-25 03:29:15 +08:00
zsbai
0a36519efe Update dns_dnspod.py 2024-03-25 03:25:26 +08:00
richard.she
b8ce943b11 fix error msg change condition 2023-01-20 22:45:20 +08:00
tengattack
e94bc6ffaa Update website for Snap 2021-12-20 13:32:25 +08:00
Eric Zhang
257c9a7578 Add Snap support (#11) 2021-12-19 21:50:20 +08:00
tengattack
04bbd26e3c Bump version to 0.24.1 2021-05-07 00:51:06 +08:00
tengattack
fc995c2939 Fix dnspod general error 2021-05-07 00:50:45 +08:00
tengattack
70833e54c2 Bump version to 0.24.0 2019-12-01 14:14:26 +08:00
8 changed files with 516 additions and 21 deletions

41
.gitignore vendored
View File

@@ -1,2 +1,43 @@
.DS_Store .DS_Store
.vs .vs
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Virtual Environment
venv/
env/
ENV/
# IDE
.idea/
.vscode/
*.swp
*.swo
# Credentials
credentials.ini
*.ini
!setup.cfg
# Logs
*.log

View File

@@ -2,32 +2,30 @@
A certbot dns plugin to obtain certificates using dnspod. A certbot dns plugin to obtain certificates using dnspod.
## Obtain API Token ## Obtain API Token
[https://www.dnspod.cn/console/user/security](https://www.dnspod.cn/console/user/security) [https://www.dnspod.cn/console/user/security](https://www.dnspod.cn/console/user/security)
## Install ## Install
Pip:
```bash ```bash
git clone https://github.com/tengattack/certbot-dns-dnspod sudo pip install git+https://github.com/tengattack/certbot-dns-dnspod.git
cd certbot-dns-dnspod
sudo python setup.py install
``` ```
If you are using `certbot-auto`, you should run `virtualenv` first: Snap:
```bash ```bash
# CentOS 7 sudo snap install certbot-dns-dnspod
virtualenv --no-site-packages --python "python2.7" "/opt/eff.org/certbot/venv" sudo snap set certbot trust-plugin-with-root=ok
/opt/eff.org/certbot/venv/bin/python2.7 setup.py install sudo snap connect certbot:plugin certbot-dns-dnspod
``` ```
## Credentials File ## Credentials File
```ini ```ini
certbot_dns_dnspod:dns_dnspod_api_id = 12345 dns_dnspod_api_id = 12345
certbot_dns_dnspod:dns_dnspod_api_token = 1234567890abcdef1234567890abcdef dns_dnspod_api_token = 1234567890abcdef1234567890abcdef
``` ```
```bash ```bash
@@ -38,8 +36,8 @@ chmod 600 /path/to/credentials.ini
## Obtain Certificates ## Obtain Certificates
```bash ```bash
certbot certonly -a certbot-dns-dnspod:dns-dnspod \ certbot certonly -a dns-dnspod \
--certbot-dns-dnspod:dns-dnspod-credentials /path/to/credentials.ini \ --dns-dnspod-credentials /path/to/credentials.ini \
-d example.com \ -d example.com \
-d "*.example.com" -d "*.example.com"
``` ```

205
certbot-dnspod-setup.md Normal file
View File

@@ -0,0 +1,205 @@
# Certbot DNSPod 插件配置指南
本文档介绍如何在 CentOS 和 Ubuntu 系统上配置 Certbot 和 DNSPod 插件,实现 SSL 证书的自动申请和续期。
## 系统要求
- CentOS 7/8 或 Ubuntu 18.04/20.04/22.04
- Python 3.6 或更高版本
- DNSPod 账号和域名
- 域名 DNS 解析在 DNSPod 管理下
## 1. 安装必要组件
### CentOS
```bash
# 安装 Python3 和 pip3
sudo yum install python3 python3-pip
# 安装 certbot
sudo python3 -m pip install certbot
```
### Ubuntu
```bash
# 安装 Python3 和 pip3
sudo apt update
sudo apt install python3 python3-pip
# 安装 certbot
sudo python3 -m pip install certbot
```
## 2. 安装 DNSPod 插件
**重要:必须使用 GitHub 源安装,避免使用 pip 或 yum 安装**
```bash
# 安装 DNSPod 插件
sudo python3 -m pip install git+https://github.com/tengattack/certbot-dns-dnspod.git
```
## 3. 配置 DNSPod API 凭证
1. 登录 DNSPod 控制台https://www.dnspod.cn/console/user/security
2. 获取 API ID 和 API Token
3. 创建凭证文件:
```bash
# 创建凭证文件
sudo mkdir -p /etc/letsencrypt
sudo tee /etc/letsencrypt/dnspod.ini << EOF
dns_dnspod_api_id = 你的API_ID
dns_dnspod_api_token = 你的API_TOKEN
EOF
# 设置权限
sudo chmod 600 /etc/letsencrypt/dnspod.ini
```
## 4. 申请证书
### 单个域名
```bash
certbot certonly -a dns-dnspod \
--dns-dnspod-credentials /etc/letsencrypt/dnspod.ini \
-d example.com
```
### 包含通配符的域名
```bash
certbot certonly -a dns-dnspod \
--dns-dnspod-credentials /etc/letsencrypt/dnspod.ini \
-d example.com \
-d "*.example.com"
```
## 5. 配置 Nginx
### CentOS
```bash
# 安装 Nginx
sudo yum install nginx
```
### Ubuntu
```bash
# 安装 Nginx
sudo apt install nginx
```
### Nginx 配置示例
```nginx
server {
listen 443 ssl;
server_name example.com *.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
location / {
root /var/www/html;
index index.html;
}
}
server {
listen 80;
server_name example.com *.example.com;
return 301 https://$host$request_uri;
}
```
## 6. 配置自动续期
1. 创建续期后的钩子脚本:
```bash
# 创建续期后的钩子脚本
sudo tee /etc/letsencrypt/renewal-hooks/post/reload-nginx.sh << 'EOF'
#!/bin/bash
# CentOS
service nginx reload
# Ubuntu
# systemctl reload nginx
EOF
# 设置脚本权限
sudo chmod +x /etc/letsencrypt/renewal-hooks/post/reload-nginx.sh
```
2. 添加定时任务:
```bash
# 编辑 crontab
sudo crontab -e
# 添加以下内容(每天凌晨 2 点检查并续期)
0 2 * * * /usr/bin/certbot renew --quiet --post-hook "service nginx reload"
```
## 7. 测试配置
```bash
# 测试证书续期
certbot renew --dry-run
# 检查证书状态
certbot certificates
# 检查 Nginx 配置
nginx -t
```
## 8. 重要文件位置
- 证书文件:`/etc/letsencrypt/live/example.com/`
- 私钥文件:`/etc/letsencrypt/live/example.com/privkey.pem`
- 完整证书链:`/etc/letsencrypt/live/example.com/fullchain.pem`
- DNSPod 凭证:`/etc/letsencrypt/dnspod.ini`
- 续期日志:`/var/log/letsencrypt/letsencrypt.log`
## 9. 故障排除
1. 401 错误
- 确保使用 GitHub 源安装 DNSPod 插件
- 检查 API 凭证是否正确
- 确认域名在 DNSPod 管理下
2. 证书续期失败
- 检查续期日志
- 确认 DNS 解析正常
- 验证 API 权限
3. Nginx 配置问题
- 检查配置文件语法
- 确认证书文件权限
- 验证 Nginx 服务状态
## 10. 维护建议
1. 定期检查:
- 证书状态
- 续期日志
- DNS 解析
2. 备份重要文件:
- 证书文件
- 配置文件
- API 凭证
3. 监控设置:
- 证书过期提醒
- 续期失败通知
- 服务状态监控
## 注意事项
1. 确保服务器时间准确
2. 保持 Python 版本更新
3. 定期检查证书状态
4. 保存所有配置文件
5. 记录重要命令和配置

View File

@@ -1,13 +1,10 @@
"""DNS Authenticator for DNSPod DNS.""" """DNS Authenticator for DNSPod DNS."""
import logging import logging
import zope.interface
from requests.exceptions import HTTPError from requests.exceptions import HTTPError
from lexicon.providers import dnspod from lexicon.providers import dnspod
from certbot import errors from certbot import errors
from certbot import interfaces
from certbot.plugins import dns_common from certbot.plugins import dns_common
from certbot.plugins import dns_common_lexicon from certbot.plugins import dns_common_lexicon
@@ -16,8 +13,6 @@ logger = logging.getLogger(__name__)
ACCOUNT_URL = 'https://www.dnspod.cn/console/user/security' ACCOUNT_URL = 'https://www.dnspod.cn/console/user/security'
@zope.interface.implementer(interfaces.IAuthenticator)
@zope.interface.provider(interfaces.IPluginFactory)
class Authenticator(dns_common.DNSAuthenticator): class Authenticator(dns_common.DNSAuthenticator):
"""DNS Authenticator for DNSPod DNS """DNS Authenticator for DNSPod DNS
@@ -123,6 +118,6 @@ class _DNSPodLexiconClient(dns_common_lexicon.LexiconClient):
.format(domain_name, e, ' ({0})'.format(hint) if hint else '')) .format(domain_name, e, ' ({0})'.format(hint) if hint else ''))
def _handle_general_error(self, e, domain_name): def _handle_general_error(self, e, domain_name):
if not str(e).startswith('Domain name invalid'): if not (str(e).startswith('Domain name invalid') or str(e).find('当前域名未添加') >= 0):
return errors.PluginError('Unexpected error determining zone identifier for {0}: {1}' return errors.PluginError('Unexpected error determining zone identifier for {0}: {1}'
.format(domain_name, e)) .format(domain_name, e))

View File

@@ -4,7 +4,7 @@ from setuptools import setup
from setuptools import find_packages from setuptools import find_packages
version = '0.23.0.dev0' version = '0.24.2'
# Remember to update local-oldest-requirements.txt when changing the minimum # Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version. # acme/certbot version.
@@ -14,7 +14,6 @@ install_requires = [
'dns-lexicon', 'dns-lexicon',
'mock', 'mock',
'setuptools', 'setuptools',
'zope.interface',
] ]
docs_extras = [ docs_extras = [

201
snap-constraints.txt Normal file
View File

@@ -0,0 +1,201 @@
# This file was generated by tools/pinning/current/repin.sh and can be updated using
# that script.
#
# It is normally used as constraints to pip, however, it has the name
# requirements.txt so that is scanned by GitHub. See
# https://docs.github.com/en/github/visualizing-repository-data-with-graphs/about-the-dependency-graph#supported-package-ecosystems
# for more info.
alabaster==0.7.12; python_version >= "3.6"
apacheconfig==0.3.2; python_version >= "3.6"
appdirs==1.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0"
appnope==0.1.2; python_version == "3.6" and sys_platform == "darwin" or python_version >= "3.7" and sys_platform == "darwin"
astroid==2.8.6; python_version >= "3.6" and python_version < "4.0"
atomicwrites==1.4.0; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.4.0"
attrs==21.2.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
awscli==1.22.11; python_version >= "3.6"
azure-devops==6.0.0b4; python_version >= "3.6"
babel==2.9.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
backcall==0.2.0; python_version == "3.6" or python_version >= "3.7"
bcrypt==3.2.0; python_version >= "3.6"
beautifulsoup4==4.10.0; python_full_version > "3.0.0" and python_version >= "3.6" or python_version >= "3.6" and python_version < "4.0" and python_full_version > "3.0.0"
bleach==4.1.0; python_version >= "3.6"
boto3==1.20.11; python_version >= "3.6"
botocore==1.23.11; python_version >= "3.6"
cachecontrol==0.12.10; python_version >= "3.6" and python_version < "4.0"
cached-property==1.5.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
cachetools==4.2.4; python_version >= "3.5" and python_version < "4.0" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6")
cachy==0.3.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0"
certifi==2021.10.8; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6"
cffi==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0" or python_version >= "3.6"
charset-normalizer==2.0.7; python_full_version >= "3.6.0" and python_version >= "3.6"
cleo==1.0.0a4; python_version >= "3.6" and python_version < "4.0"
cloudflare==2.8.15; python_version >= "3.6"
colorama==0.4.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or python_full_version >= "3.5.0" and python_version >= "3.6" and sys_platform == "win32" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.6" and python_version < "4.0" and sys_platform == "win32" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_full_version < "3.0.0" and platform_system == "Windows" or python_version >= "3.6" and python_full_version >= "3.5.0" and platform_system == "Windows" or python_version == "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or python_version == "3.6" and sys_platform == "win32" and python_full_version >= "3.5.0" or python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or python_version >= "3.7" and sys_platform == "win32" and python_full_version >= "3.5.0"
configargparse==1.5.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
configobj==5.0.6; python_version >= "3.6"
coverage==6.1.2; python_version >= "3.6" or python_version >= "3.6"
crashtest==0.3.1; python_version >= "3.6" and python_version < "4.0"
cryptography==36.0.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6" or python_version >= "3.6" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and sys_platform == "linux"
cython==0.29.24; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
dataclasses==0.8; python_version >= "3.6" and python_version < "3.7"
decorator==5.1.0; python_version == "3.6" or python_version > "3.6" or python_version >= "3.5" or python_version >= "3.7"
deprecated==1.2.13; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
distlib==0.3.3; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" or python_version >= "3.6"
distro==1.6.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_version >= "3.6"
dns-lexicon==3.8.3; python_version >= "3.6" and python_version < "4.0"
dnspython==2.1.0; python_version >= "3.6"
docker-compose==1.26.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
docker==4.2.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
dockerpty==0.4.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
docopt==0.6.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
docutils==0.15.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version >= "3.4.0"
entrypoints==0.3; python_version >= "3.6" and python_version < "4.0"
execnet==1.9.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
fabric==2.6.0; python_version >= "3.6"
filelock==3.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" or python_version >= "3.6" and python_version < "4.0"
google-api-core==2.2.2; python_version >= "3.6"
google-api-python-client==2.31.0; python_version >= "3.6"
google-auth-httplib2==0.1.0; python_version >= "3.6"
google-auth==2.3.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
googleapis-common-protos==1.53.0; python_version >= "3.6"
html5lib==1.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0"
httplib2==0.20.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
idna==3.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6" and python_version < "4.0"
imagesize==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
importlib-metadata==1.7.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_version >= "3.6" and python_version < "3.8" and python_full_version >= "3.5.0"
importlib-resources==5.4.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.7" or python_version >= "3.6" and python_version < "3.7" and python_full_version >= "3.4.0"
iniconfig==1.1.1; python_version >= "3.6"
invoke==1.6.0; python_version >= "3.6"
ipdb==0.13.9; python_version >= "3.6"
ipython-genutils==0.2.0
ipython==7.16.1; python_version == "3.6"
ipython==7.29.0; python_version >= "3.7"
isodate==0.6.0; python_version >= "3.6"
isort==5.8.0; python_version >= "3.6" and python_version < "4.0"
jedi==0.18.1; python_version == "3.6" or python_version >= "3.7"
jeepney==0.7.1; python_version >= "3.6" and python_version < "4.0" and sys_platform == "linux"
jinja2==3.0.3; python_version >= "3.6" or python_version >= "3.6"
jmespath==0.10.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6"
josepy==1.9.0; python_version >= "3.6"
jsonlines==2.0.0; python_version >= "3.6"
jsonpickle==2.0.0; python_version >= "3.6"
jsonschema==3.2.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
keyring==22.3.0; python_version >= "3.6" and python_version < "4.0" or python_version >= "3.6"
lazy-object-proxy==1.6.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0"
lockfile==0.12.2
markupsafe==2.0.1; python_version >= "3.6"
matplotlib-inline==0.1.3; python_version >= "3.7"
mccabe==0.6.1; python_version >= "3.6" and python_version < "4.0"
mock==4.0.3; python_version >= "3.6"
msgpack==1.0.2; python_version >= "3.6" and python_version < "4.0"
msrest==0.6.21; python_version >= "3.6"
mypy-extensions==0.4.3; python_version >= "3.6"
mypy==0.910; python_version >= "3.6"
oauth2client==4.1.3; python_version >= "3.6"
oauthlib==3.1.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
packaging==20.9; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" or python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version >= "3.5.0"
paramiko==2.8.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" or python_version >= "3.6"
parsedatetime==2.6; python_version >= "3.6"
parso==0.8.2; python_version == "3.6"
pathlib2==2.3.6; python_version >= "3.6"
pexpect==4.8.0; python_version >= "3.6" and python_version < "4.0" or python_version == "3.6" and sys_platform != "win32" or python_version >= "3.7" and sys_platform != "win32"
pickleshare==0.7.5; python_version == "3.6" or python_version >= "3.7"
pip==21.3.1; python_version >= "3.6"
pkginfo==1.8.1; python_version >= "3.6" and python_version < "4.0" or python_version >= "3.6"
platformdirs==2.4.0; python_version >= "3.6" and python_version < "4.0"
pluggy==1.0.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0" or python_version >= "3.6"
ply==3.11; python_version >= "3.6"
poetry-core==1.1.0a6; python_version >= "3.6" and python_version < "4.0"
poetry==1.2.0a2; python_version >= "3.6" and python_version < "4.0"
prompt-toolkit==3.0.22; python_version == "3.6" and python_full_version >= "3.6.2" or python_version >= "3.7" and python_full_version >= "3.6.2"
protobuf==3.19.1; python_version >= "3.6"
ptyprocess==0.7.0; python_version >= "3.6" and python_version < "4.0"
py==1.11.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pyasn1-modules==0.2.8; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6"
pyasn1==0.4.8; python_version >= "3.6" and python_version < "4" or python_version >= "3.6"
pycparser==2.21; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
pygithub==1.55; python_version >= "3.6"
pygments==2.10.0; python_version >= "3.6" or python_version == "3.6" or python_version >= "3.7"
pyjwt==2.3.0; python_version >= "3.6"
pylev==1.4.0; python_version >= "3.6" and python_version < "4.0"
pylint==2.11.1; python_version >= "3.6" and python_version < "4.0"
pynacl==1.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
pynsist==2.7; python_version >= "3.6"
pyopenssl==21.0.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
pyparsing==3.0.6; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0"
pypiwin32==223; sys_platform == "win32" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6")
pyrfc3339==1.1; python_version >= "3.6"
pyrsistent==0.18.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
pytest-cov==3.0.0; python_version >= "3.6" or python_version >= "3.6"
pytest-forked==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pytest-xdist==2.4.0; python_version >= "3.6" or python_version >= "3.6"
pytest==6.2.5; python_version >= "3.6" or python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
python-augeas==1.1.0; python_version >= "3.6"
python-dateutil==2.8.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6"
python-digitalocean==1.17.0; python_version >= "3.6"
python-dotenv==0.19.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
pytz==2021.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0" or python_version >= "3.6"
pywin32-ctypes==0.2.0; python_version >= "3.6" and python_version < "4.0" and sys_platform == "win32"
pywin32==302; sys_platform == "win32" and python_version >= "3.6" or sys_platform == "win32" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6")
pyyaml==5.4.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0"
readme-renderer==30.0; python_version >= "3.6"
requests-download==0.1.2; python_version >= "3.6"
requests-file==1.5.1; python_version >= "3.6" and python_version < "4.0"
requests-oauthlib==1.3.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
requests-toolbelt==0.9.1; python_version >= "3.6" and python_version < "4.0" or python_version >= "3.6" or python_version >= "3.6"
requests==2.26.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0"
rfc3986==1.5.0; python_version >= "3.6"
rsa==4.7.2; python_version >= "3.6" and python_version < "4" or python_version >= "3.5" and python_version < "4" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6")
s3transfer==0.5.0; python_version >= "3.6"
secretstorage==3.3.1; python_version >= "3.6" and python_version < "4.0" and sys_platform == "linux"
semantic-version==2.8.5; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
setuptools-rust==0.12.1; python_version >= "3.6"
setuptools==59.2.0; python_version >= "3.6" or python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_version == "3.6" or python_version >= "3.7" or python_version >= "3.6" and python_version < "4.0"
shellingham==1.4.0; python_version >= "3.6" and python_version < "4.0"
six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" or python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_full_version >= "3.6.0" and python_version >= "3.6" or python_full_version >= "3.3.0" and python_version >= "3.6" or python_version >= "3.6" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.3.0" or python_version == "3.6" and python_full_version < "3.0.0" or python_version == "3.6" and python_full_version >= "3.3.0"
snowballstemmer==2.2.0; python_version >= "3.6"
soupsieve==2.3.1; python_full_version > "3.0.0" and python_version >= "3.6"
sphinx-rtd-theme==1.0.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
sphinx==4.3.0; python_version >= "3.6" or python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
sphinxcontrib-applehelp==1.0.2; python_version >= "3.6"
sphinxcontrib-devhelp==1.0.2; python_version >= "3.6"
sphinxcontrib-htmlhelp==2.0.0; python_version >= "3.6"
sphinxcontrib-jsmath==1.0.1; python_version >= "3.6"
sphinxcontrib-qthelp==1.0.3; python_version >= "3.6"
sphinxcontrib-serializinghtml==1.1.5; python_version >= "3.6"
texttable==1.6.4; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
tldextract==3.1.2; python_version >= "3.6" and python_version < "4.0"
toml==0.10.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6" or python_version == "3.6" and python_full_version < "3.0.0" or python_version > "3.6" and python_full_version < "3.0.0" or python_version == "3.6" and python_full_version >= "3.3.0" or python_version > "3.6" and python_full_version >= "3.3.0" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.3.0" or python_version >= "3.6" and python_full_version >= "3.5.0"
tomli==1.2.2; python_version >= "3.6"
tomlkit==0.7.2; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0"
tox==3.24.4; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0"
tqdm==4.62.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.4.0"
traitlets==4.3.3
twine==3.3.0; python_version >= "3.6"
typed-ast==1.4.3; python_version >= "3.6" and python_version < "3.8" or implementation_name == "cpython" and python_version < "3.8" and python_version >= "3.6"
types-cryptography==3.3.8; python_version >= "3.6"
types-enum34==1.1.1; python_version >= "3.6"
types-ipaddress==1.0.1; python_version >= "3.6"
types-mock==4.0.3; python_version >= "3.6"
types-pyopenssl==21.0.0; python_version >= "3.6"
types-pyrfc3339==1.1.0; python_version >= "3.6"
types-python-dateutil==2.8.2; python_version >= "3.6"
types-pytz==2021.3.0; python_version >= "3.6"
types-requests==2.26.0; python_version >= "3.6"
types-setuptools==57.4.2; python_version >= "3.6"
types-six==1.16.2; python_version >= "3.6"
typing-extensions==4.0.0; python_version >= "3.6" or python_version >= "3.6" and python_version < "3.10"
uritemplate==4.1.1; python_version >= "3.6"
urllib3==1.26.7; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.6" or python_full_version >= "3.5.0" and python_version < "4" and python_version >= "3.6"
virtualenv==20.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.4.0" or python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0"
wcwidth==0.2.5; python_version == "3.6" and python_full_version >= "3.6.2"
webencodings==0.5.1; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0" or python_version >= "3.6"
websocket-client==0.59.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" or python_full_version >= "3.5.0" and python_version >= "3.6"
wheel==0.37.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0"
wrapt==1.13.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.5.0"
yarg==0.1.9; python_version >= "3.6"
zipp==3.6.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" or python_version >= "3.6" and python_version < "3.8" and python_full_version >= "3.5.0" or python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.7" or python_version >= "3.6" and python_version < "3.7" and python_full_version >= "3.4.0"
zope.component==5.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
zope.event==4.5.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
zope.hookable==5.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
zope.interface==5.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"

4
snap-requirements.txt Normal file
View File

@@ -0,0 +1,4 @@
acme>=0.21.1
dns-lexicon>=3.8.3
mock>=4.0.3
setuptools>=59.2.0

52
snap/snapcraft.yaml Normal file
View File

@@ -0,0 +1,52 @@
name: certbot-dns-dnspod
summary: DNSPod DNS Authenticator plugin for Certbot
version: '0.24.2'
description: A certbot dns plugin to obtain certificates using dnspod. For information on how to set up, go to the GitHub page.
website: https://github.com/tengattack/certbot-dns-dnspod
license: Apache-2.0
confinement: strict
grade: stable
base: core20
adopt-info: certbot-dns-dnspod
architectures:
- build-on: arm64
- build-on: amd64
parts:
certbot-dns-dnspod:
plugin: python
source: .
override-pull: |
snapcraftctl pull
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
build-environment:
- PIP_CONSTRAINT: $SNAPCRAFT_PART_SRC/snap-constraints.txt
- SNAP_BUILD: "True"
requirements:
- snap-requirements.txt
build-packages:
- gcc
- git
- build-essential
- libssl-dev
- libffi-dev
- python3-dev
certbot-metadata:
plugin: dump
source: .
stage: [setup.py, certbot-shared]
override-pull: |
snapcraftctl pull
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
slots:
certbot:
interface: content
content: certbot-1
read:
- $SNAP/lib/python3.8/site-packages
plugs:
certbot-metadata:
interface: content
content: metadata-1
target: $SNAP/certbot-shared