first commit
This commit is contained in:
+149
@@ -0,0 +1,149 @@
|
||||
# 📋 DNS 解析配置指南
|
||||
|
||||
不管你的域名在哪里注册,SSL Manager 都会自动展示需要的 DNS 解析配置。
|
||||
|
||||
## 🎯 功能说明
|
||||
|
||||
SSL Manager 内置了智能 DNS 配置指南,根据你选择的验证方式自动展示:
|
||||
|
||||
### HTTP-01 验证
|
||||
- 需要域名解析到你的服务器
|
||||
- 需要 80 端口可公网访问
|
||||
- 自动展示 A 记录配置
|
||||
|
||||
### DNS-01 验证(推荐)
|
||||
- 无需 80 端口
|
||||
- 支持通配符证书
|
||||
- 自动添加 TXT 记录(需 API 凭证)
|
||||
|
||||
## 🌐 支持的 DNS 服务商
|
||||
|
||||
| 服务商 | 控制台 | API 配置 |
|
||||
|--------|--------|----------|
|
||||
| Cloudflare | [dash.cloudflare.com](https://dash.cloudflare.com/) | My Profile → API Tokens |
|
||||
| 阿里云 | [dns.console.aliyun.com](https://dns.console.aliyun.com/) | RAM → AccessKey |
|
||||
| 腾讯云 | [console.cloud.tencent.com/dns](https://console.cloud.tencent.com/dns) | 访问管理 → API 密钥 |
|
||||
| GoDaddy | [dcc.godaddy.com](https://dcc.godaddy.com/) | My Products → Apps → CREATE |
|
||||
| NameSilo | [namesilo.com](https://www.namesilo.com/) | My Account → API-Manager |
|
||||
| Namecheap | [namecheap.com](https://www.namecheap.com/) | Profile → API Access |
|
||||
| DNSPod | [dnspod.cn](https://www.dnspod.cn/) | 账户中心 → API 令牌 |
|
||||
| AWS Route53 | [console.aws.amazon.com/route53](https://console.aws.amazon.com/route53/) | IAM → Users |
|
||||
| Google Cloud | [console.cloud.google.com](https://console.cloud.google.com/) | IAM & Admin → Service accounts |
|
||||
| Azure DNS | [portal.azure.com](https://portal.azure.com/) | Azure AD → App registrations |
|
||||
|
||||
## 📖 使用方式
|
||||
|
||||
### 方式一:Web 界面(推荐)
|
||||
|
||||
1. 启动 SSL Manager
|
||||
```bash
|
||||
cd /root/.openclaw/workspace/ssl-manager
|
||||
./scripts/start-ssl-manager.sh start
|
||||
```
|
||||
|
||||
2. 访问 Web 界面
|
||||
```
|
||||
http://localhost:3000
|
||||
```
|
||||
|
||||
3. 点击"申请新证书"
|
||||
|
||||
4. 选择验证方式后,自动显示 DNS 配置指南
|
||||
|
||||
### 方式二:API 调用
|
||||
|
||||
```bash
|
||||
# 获取 DNS 配置指南
|
||||
curl http://localhost:3000/api/dns-guide/guide?validationType=dns-01
|
||||
|
||||
# 获取服务商列表
|
||||
curl http://localhost:3000/api/dns-guide/providers
|
||||
|
||||
# 获取指定服务商详情
|
||||
curl http://localhost:3000/api/dns-guide/guide?validationType=dns-01&provider=cloudflare
|
||||
```
|
||||
|
||||
## 🔧 API 响应示例
|
||||
|
||||
### HTTP-01 验证指南
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"currentGuide": {
|
||||
"title": "HTTP-01 验证 - DNS 解析配置",
|
||||
"description": "HTTP-01 验证需要域名解析到你的服务器...",
|
||||
"records": [
|
||||
{
|
||||
"host": "@",
|
||||
"type": "A",
|
||||
"value": "你的服务器 IP 地址",
|
||||
"ttl": "600",
|
||||
"note": "主域名解析到服务器"
|
||||
}
|
||||
],
|
||||
"steps": [...],
|
||||
"tips": [...]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### DNS-01 验证指南(带服务商)
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"currentGuide": {
|
||||
"title": "DNS-01 验证 - DNS 解析配置",
|
||||
"description": "DNS-01 验证会自动添加 TXT 记录...",
|
||||
"records": [
|
||||
{
|
||||
"host": "_acme-challenge",
|
||||
"type": "TXT",
|
||||
"value": "acme.sh 自动生成",
|
||||
"ttl": "600",
|
||||
"note": "证书申请时自动添加/删除"
|
||||
}
|
||||
]
|
||||
},
|
||||
"providerInfo": {
|
||||
"name": "Cloudflare",
|
||||
"consoleUrl": "https://dash.cloudflare.com/",
|
||||
"dnsPath": "选择域名 → DNS → Records",
|
||||
"apiPath": "用户头像 → My Profile → API Tokens",
|
||||
"envVars": [
|
||||
{"key": "CF_Key", "note": "API Token 或 Global API Key"},
|
||||
{"key": "CF_Email", "note": "Cloudflare 账户邮箱"}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 💡 常见问题
|
||||
|
||||
### Q: 我不知道域名在哪里注册怎么办?
|
||||
A: 使用 `whois 你的域名` 命令查询,或查看域名注册时的邮件通知。
|
||||
|
||||
### Q: DNS 记录添加后多久生效?
|
||||
A: 通常 1-10 分钟,取决于 TTL 设置和 DNS 服务商。
|
||||
|
||||
### Q: 可以使用第三方 DNS 吗?
|
||||
A: 可以!域名注册商和 DNS 服务商可以不同。只需将域名的 NS 记录指向第三方 DNS 即可。
|
||||
|
||||
### Q: API 凭证安全吗?
|
||||
A: API 凭证会加密存储在数据库中,仅用于自动添加 DNS 记录。
|
||||
|
||||
## 🔗 相关文档
|
||||
|
||||
- [SSL Manager 使用指南](README.md)
|
||||
- [服务管理](SERVICE.md)
|
||||
- [acme.sh 官方文档](https://github.com/acmesh-official/acme.sh)
|
||||
|
||||
---
|
||||
|
||||
**开发**: 小弟 👋
|
||||
**更新日期**: 2026-04-08
|
||||
Reference in New Issue
Block a user