chore: 文档增加插件列表

pull/409/head
xiaojunnuo 2025-05-08 23:27:46 +08:00
parent 81d6dad548
commit 98b51f0799
9 changed files with 306 additions and 43 deletions

View File

@ -88,7 +88,6 @@ export default defineConfig({
text: "特性",
items: [
{text: "CNAME代理校验", link: "/guide/feature/cname/index.md"},
{text: "插件列表", link: "/guide/plugins.md"},
{text: "多数据库支持", link: "/guide/install/database.md"},
{text: "开放接口", link: "/guide/open/index.md"},
{
@ -98,7 +97,13 @@ export default defineConfig({
{text: "安全生产建议", link: "/guide/feature/safe/suggest"},
]
},
{text: "插件列表", items:[
{text: "授权提供商", link: "/guide/plugins/access"},
{text: "DNS提供商", link: "/guide/plugins/dns-provider"},
{text: "任务插件", link: "/guide/plugins/deploy"},
{text: "通知插件", link: "/guide/plugins/notification"},
]
},
]
},
{

View File

@ -1,5 +0,0 @@
# 插件列表
![img_1.png](../images/plugins/list.png)

View File

@ -0,0 +1,48 @@
# 授权列表
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **阿里云授权** | |
| 2.| **EAB授权** | ZeroSSL证书申请需要EAB授权 |
| 3.| **google cloud** | 谷歌云授权 |
| 4.| **主机登录授权** | |
| 5.| **SFTP授权** | |
| 6.| **阿里云OSS授权** | 包含地域和Bucket |
| 7.| **FTP授权** | |
| 8.| **腾讯云** | |
| 9.| **腾讯云COS授权** | 腾讯云对象存储授权,包含地域和存储桶 |
| 10.| **七牛云授权** | |
| 11.| **七牛OSS授权** | |
| 12.| **天翼云授权** | |
| 13.| **s3/minio授权** | S3/minio oss授权 |
| 14.| **baota授权** | |
| 15.| **易盾DCDN授权** | https://user.yiduncdn.com |
| 16.| **易盾rcdn授权** | 易盾CDN每月免费30G[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) |
| 17.| **易发云短信** | sms.yfyidc.cn/ |
| 18.| **cdnfly授权** | |
| 19.| **群晖登录授权** | |
| 20.| **k8s授权** | |
| 21.| **1panel授权** | 账号和密码 |
| 22.| **百度云授权** | |
| 23.| **LeCDN授权** | |
| 24.| **白山云授权** | |
| 25.| **plesk授权** | |
| 26.| **易支付** | |
| 27.| **支付宝** | |
| 28.| **微信支付** | |
| 29.| **长亭雷池授权** | |
| 30.| **lucky** | |
| 31.| **括彩云cdn授权** | 括彩云CDN每月免费30G[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
| 32.| **uniCloud** | unicloud授权 |
| 33.| **华为云授权** | |
| 34.| **西部数码授权** | |
| 35.| **多吉云** | |
| 36.| **我爱云授权** | 我爱云CDN |
| 37.| **CacheFly** | CacheFly |
| 38.| **Gcore** | Gcore |
| 39.| **亚马逊云aws授权** | |
| 40.| **dns.la授权** | |
| 41.| **又拍云** | |
| 42.| **火山引擎** | |
| 43.| **京东云** | |
| 44.| **51dns授权** | |

View File

@ -0,0 +1,120 @@
# 任务插件
`70` 款任务插件
## 1. 证书申请
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **证书申请JS版** | 免费通配符域名证书申请,支持多个域名打到同一个证书上 |
| 2.| **证书申请Lego** | 支持海量DNS解析提供商推荐使用一样的免费通配符域名证书申请支持多个域名打到同一个证书上 |
| 3.| **商用证书托管** | 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次) |
## 2. 主机
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **FTP-上传证书到FTP** | 将证书上传到FTP服务器 |
| 2.| **IIS-部署到IIS站点** | |
| 3.| **主机-执行远程主机脚本命令** | 可以执行重启nginx等操作让证书生效 |
| 4.| **主机-部署证书到SSH主机** | SFTP上传证书到主机然后SSH执行部署脚本命令 |
## 3. CDN
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **易盾-部署到易盾DCDN** | 主要是防御http://user.yiduncdn.com/ |
| 2.| **易盾-部署到易盾RCDN** | 易盾CDN每月免费30G[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) |
| 3.| **cdnfly-部署证书到cdnfly** | cdnfly |
| 4.| **百度云-部署证书到CDN** | 部署到百度云CDN |
| 5.| **LeCDN-更新证书** | |
| 6.| **LeCDN-更新证书V2** | 支持新版本LeCDN |
| 7.| **白山云-更新证书** | |
| 8.| **天翼云-部署证书到CDN** | 部署证书到天翼云CDN和全站加速 |
| 9.| **括彩云-部署到括彩云CDN** | 括彩云CDN每月免费30G[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
| 10.| **多吉云-部署到多吉云CDN** | |
| 11.| **我爱云-部署证书到我爱云CDN** | 部署证书到我爱云CDN |
| 12.| **CacheFly-部署证书到CacheFly** | 部署证书到 CacheFly |
| 13.| **Gcore-部署证书到Gcore** | 仅上传 并不会部署到cdn |
| 14.| **Gcore-刷新Gcore证书** | 刷新现有的证书 |
| 15.| **又拍云-部署证书到CDN/USS** | 支持又拍云CDN又拍云云存储USS |
## 4. 面板
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **宝塔-面板证书部署** | 部署宝塔面板本身的ssl证书 |
| 2.| **宝塔-网站证书部署** | 部署宝塔管理的站点的ssl证书目前支持网站站点、docker站点等 |
| 3.| **群晖-部署证书到群晖面板** | Synology支持6.x以上版本 |
| 4.| **K8S-部署证书到Secret** | 部署证书到k8s的secret |
| 5.| **K8S-Ingress 证书部署** | 部署证书到k8s的Ingress |
| 6.| **1Panel-部署证书到1Panel** | 更新1Panel的证书 |
| 7.| **Plesk-部署Plesk网站证书** | |
| 8.| **雷池-更新证书** | 更新长亭雷池WAF的证书 |
| 9.| **lucky-更新Lucky证书** | |
| 10.| **uniCloud-部署到服务空间** | 部署到服务空间 |
| 11.| **威联通-部署证书到威联通** | 部署证书到qnap |
## 5. 阿里云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **阿里云-部署到Ack** | 部署到阿里云Ack集群Ingress等通过Secret管理证书的应用 |
| 2.| **阿里云-部署至任意云资源** | 【不建议使用】需要消耗阿里云自动部署次数支持SLB、LIVE、webHosting、VOD、CR、DCDN、DDoS、CDN、ALB、APIGateway、FC、GA、MSE、NLB、OSS、SAE、WAF等云产品 |
| 3.| **阿里云-部署证书至CDN** | 自动部署域名证书至阿里云CDN |
| 4.| **阿里云-部署证书至DCDN** | 依赖证书申请前置任务自动部署域名证书至阿里云DCDN |
| 5.| **阿里云-部署证书至OSS** | 自动部署域名证书至阿里云OSS |
| 6.| **阿里云-上传证书到阿里云** | 如果不想在阿里云上同一份证书上传多次,可以把此任务作为前置任务,其他阿里云任务证书那一项选择此任务的输出 |
| 7.| **阿里云-部署至阿里云WAF** | 部署证书到阿里云WAF |
| 8.| **阿里云-部署至ALB应用负载均衡** | ALB,更新监听器的默认证书 |
| 9.| **阿里云-部署至NLB网络负载均衡** | NLB,网络负载均衡,更新监听器的默认证书 |
| 10.| **阿里云-部署至SLB(传统负载均衡)** | 部署证书到阿里云SLB(传统负载均衡) |
| 11.| **阿里云-部署至阿里云FC(3.0)** | 部署证书到阿里云函数计算FC3.0,【注意】证书的加密算法必须选择【pkcs1旧版】 |
## 6. 华为云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **华为云-部署证书至CDN** | |
## 7. 腾讯云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **腾讯云-部署证书到任意云资源** | 支持负载均衡、CDN、DDoS、直播、点播、Web应用防火墙、API网关、TEO、容器服务、对象存储、轻应用服务器、云原生微服务、云开发 |
| 2.| **腾讯云-部署到CLB** | 暂时只支持单向认证证书,暂时只支持通用负载均衡 |
| 3.| **腾讯云-部署到CDN废弃** | 已废弃请使用v2版 |
| 4.| **腾讯云-部署到CDN-v2** | 推荐使用 |
| 5.| **腾讯云-上传证书到腾讯云** | 上传成功后输出tencentCertId |
| 6.| **腾讯云-部署证书到COS** | 部署到腾讯云COS源站域名证书【注意很不稳定需要重试很多次偶尔才能成功一次】 |
| 7.| **腾讯云-部署到腾讯云EO** | 腾讯云边缘安全加速平台EO必须配置上传证书到腾讯云任务 |
| 8.| **腾讯云-删除即将过期证书** | 仅删除未使用的证书 |
| 9.| **腾讯云-部署到TKE-ingress** | serverless集群请使用K8S部署插件Qcloud类型需要【上传到腾讯云】作为前置任务ApiServer未开启外网访问则需要做域名的内网IP映射 |
## 8. 火山引擎
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **火山引擎-部署证书至CDN** | 支持网页,文件下载,音视频点播 |
| 2.| **火山引擎-部署证书至CLB** | 部署至火山引擎负载均衡 |
| 3.| **火山引擎-上传证书至证书中心** | 上传证书至火山引擎证书中心 |
| 4.| **火山引擎-部署证书至ALB** | 部署至火山引擎应用负载均衡 |
| 5.| **火山引擎-部署证书至Live** | 部署至火山引擎视频直播 |
## 9. 京东云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **京东云-部署证书至CDN** | 京东云内容分发网络 |
| 2.| **京东云-更新已有证书** | 更新SSL数字证书中的证书 |
| 3.| **京东云-上传新证书** | 上传证书到SSL数字证书中心 |
## 10. 七牛云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **七牛云-部署证书至OSS** | 自动部署域名证书至七牛云KODO注意是自定义源站域名不是CDN域名 |
| 2.| **七牛云-部署证书至CDN** | 自动部署域名证书至七牛云CDN |
## 11. 亚马逊云
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **AWS-部署证书到CloudFront** | 部署证书到 AWS CloudFront |
## 12. 其他
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **Demo-测试插件** | |
| 2.| **重启 Certd** | 【仅管理员可用】 重启 certd的https服务用于更新 Certd 的 ssl 证书 |
| 3.| **自定义js脚本** | 【仅管理员】运行自定义js脚本执行 |
| 4.| **等待** | 等待一段时间 |
| 5.| **数据库备份** | 仅支持备份SQLite数据库 |

View File

@ -0,0 +1,12 @@
# DNS提供商
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **阿里云** | 阿里云DNS解析提供商 |
| 2.| **腾讯云** | 腾讯云域名DNS解析提供者 |
| 3.| **华为云** | 华为云DNS解析提供商 |
| 4.| **西部数码** | west dns provider |
| 5.| **dns.la** | dns.la |
| 6.| **火山引擎** | 火山引擎DNS解析提供商 |
| 7.| **京东云** | 京东云DNS解析提供商 |
| 8.| **51dns** | 51DNS |

View File

@ -0,0 +1,16 @@
# 通知插件
| 序号 | 名称 | 说明 |
|-----|-----|-----|
| 1.| **企业微信通知** | 企业微信群聊机器人通知 |
| 2.| **电子邮件** | 电子邮件通知 |
| 3.| **爱语飞飞微信通知(iyuu)** | https://iyuu.cn/ |
| 4.| **自定义webhook** | 根据模版自定义http请求 |
| 5.| **Server酱ᵀ** | https://sct.ftqq.com/ |
| 6.| **Server酱³** | https://doc.sc3.ft07.com/serverchan3 |
| 7.| **AnPush** | https://anpush.com |
| 8.| **Telegram通知** | Telegram Bot推送通知 |
| 9.| **Discord 通知** | Discord 机器人通知 |
| 10.| **Slack通知** | Slack消息推送通知 |
| 11.| **Bark 通知** | Bark 推送通知插件 |
| 12.| **飞书通知** | 飞书群聊webhook通知 |

View File

@ -0,0 +1,63 @@
import "./dist/plugins/index.js";
import { accessRegistry, notificationRegistry, pluginGroups, pluginRegistry } from "@certd/pipeline";
import { dnsProviderRegistry } from "@certd/plugin-cert";
import fs from "fs";
function genPluginMd() {
const plugins = {
access: [],
deploy: [],
dnsProvider: [],
notification: []
};
plugins.access = accessRegistry.getDefineList();
plugins.deploy = pluginRegistry.getDefineList();
plugins.dnsProvider = dnsProviderRegistry.getDefineList();
plugins.notification = notificationRegistry.getDefineList();
function genMd(list) {
let mdContent = `
| 序号 | 名称 | 说明 |
|-----|-----|-----|
`;
let i = 0;
for (const x of list) {
i++
mdContent += `| ${i}.| **${x.title}** | ${x.desc||''} | \n`;
}
return mdContent;
}
let mdContent = "";
mdContent = "# 授权列表\n";
mdContent += genMd(plugins.access);
fs.writeFileSync("../../../docs/guide/plugins/access.md", mdContent);
mdContent = "# DNS提供商\n";
mdContent += genMd(plugins.dnsProvider);
fs.writeFileSync("../../../docs/guide/plugins/dns-provider.md", mdContent);
mdContent = "# 通知插件\n";
mdContent += genMd(plugins.notification);
fs.writeFileSync("../../../docs/guide/plugins/notification.md", mdContent);
mdContent = "# 任务插件\n";
mdContent += `\`${plugins.deploy.length}\` 款任务插件 \n`
let index =0
for (const key in pluginGroups) {
index++
const group = pluginGroups[key];
mdContent += `## ${index}. ${group.title}\n`;
mdContent += genMd(group.plugins);
fs.writeFileSync("../../../docs/guide/plugins/deploy.md", mdContent);
}
process.exit()
}
genPluginMd()

View File

@ -50,49 +50,52 @@ export default async function loadModules(dir) {
function isPrototypeOf(value,cls){
return cls.prototype.isPrototypeOf(value.prototype)
}
async function genMetadata(){
const modules = await loadModules('./dist/plugins');
const modules = await loadModules('./dist/plugins');
fs.rmSync("./metadata", { recursive: true });
fs.mkdirSync("./metadata", { recursive: true });
for (const key in modules) {
console.log(key)
const module = modules[key]
const entry = Object.entries(module)
for (const [name, value] of entry) {
//如果有define属性
if(value.define){
//那么就是插件
let location = key.substring(4)
location = location.substring(0, location.length - 3)
location = location.replaceAll("\\","/")
location += ".js"
location = `../../..${location}` // 从modules/plugin/plugin-service 加载 ../../plugins目录下的文件
fs.rmSync("./metadata", { recursive: true });
fs.mkdirSync("./metadata", { recursive: true });
for (const key in modules) {
console.log(key)
const module = modules[key]
const entry = Object.entries(module)
for (const [name, value] of entry) {
//如果有define属性
if(value.define){
//那么就是插件
let location = key.substring(4)
location = location.substring(0, location.length - 3)
location = location.replaceAll("\\","/")
location += ".js"
location = `../../..${location}` // 从modules/plugin/plugin-service 加载 ../../plugins目录下的文件
const pluginDefine = {
...value.define
}
pluginDefine.type = "builtIn"
if(pluginDefine.accessType){
pluginDefine.pluginType = "dnsProvider"
}else if(isPrototypeOf(value,AbstractTaskPlugin)){
pluginDefine.pluginType = "deploy"
}else if(isPrototypeOf(value,BaseNotification)){
pluginDefine.pluginType = "notification"
}else if(isPrototypeOf(value,BaseAccess)){
pluginDefine.pluginType = "access"
}else{
console.log(`[warning] 未知的插件类型:${pluginDefine.name}`)
}
const pluginDefine = {
...value.define
const filePath = path.join(`./metadata/${pluginDefine.pluginType}_${pluginDefine.name}.yaml`)
pluginDefine.scriptFilePath = location
const data = yaml.dump(pluginDefine)
fs.writeFileSync(filePath,data ,'utf8')
}
pluginDefine.type = "builtIn"
if(pluginDefine.accessType){
pluginDefine.pluginType = "dnsProvider"
}else if(isPrototypeOf(value,AbstractTaskPlugin)){
pluginDefine.pluginType = "deploy"
}else if(isPrototypeOf(value,BaseNotification)){
pluginDefine.pluginType = "notification"
}else if(isPrototypeOf(value,BaseAccess)){
pluginDefine.pluginType = "access"
}else{
console.log(`[warning] 未知的插件类型:${pluginDefine.name}`)
}
const filePath = path.join(`./metadata/${pluginDefine.pluginType}_${pluginDefine.name}.yaml`)
pluginDefine.scriptFilePath = location
const data = yaml.dump(pluginDefine)
fs.writeFileSync(filePath,data ,'utf8')
}
}
process.exit()
}
// import why from 'why-is-node-running'
// setTimeout(() => why(), 100); // 延迟打印原因
genMetadata()
process.exit()

View File

@ -22,6 +22,7 @@
"ci": "npm run cov",
"build": "mwtsc --cleanOutDir --skipLibCheck",
"export-metadata": "node export-plugin-yaml.js",
"export-md": "node export-plugin-md.js",
"dev-build": "echo 1",
"build-on-docker": "node ./before-build.js && npm run build",
"up-mw-deps": "npx midway-version -u -w",