mirror of
https://github.com/certd/certd.git
synced 2026-04-06 07:50:54 +08:00
Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
335745d365 | ||
|
|
4204b31398 | ||
|
|
029a568645 | ||
|
|
6b2f1fcd3e | ||
|
|
3bdc610249 | ||
|
|
c03a70fde2 | ||
|
|
c77645e173 | ||
|
|
6531002d61 | ||
|
|
fea808ca5f | ||
|
|
59ba408070 | ||
|
|
3a8931feef | ||
|
|
7ebd8f6bf5 | ||
|
|
73883979c6 | ||
|
|
d8935b46b3 | ||
|
|
1505d04622 | ||
|
|
3b690cc31f | ||
|
|
b3814920bd | ||
|
|
8bf1f828b9 | ||
|
|
911e69e3bc | ||
|
|
77b4a1eaf6 | ||
|
|
2ed12c429e | ||
|
|
e578c52fdf | ||
|
|
5ff4e3c4ea | ||
|
|
1c2e7256c1 | ||
|
|
7a51ca225a | ||
|
|
8d242d8072 | ||
|
|
543b068efa | ||
|
|
eadbd5e821 | ||
|
|
c771f5a13c | ||
|
|
f13b3111c3 | ||
|
|
bb2714ff24 | ||
|
|
54c42b1fc2 | ||
|
|
1f42f933f0 | ||
|
|
6c533d225b | ||
|
|
67a89d1289 | ||
|
|
0b9bef2f38 | ||
|
|
1c4649409d | ||
|
|
e1daaf07ce | ||
|
|
cd21f2d1d7 | ||
|
|
836e41064f | ||
|
|
4658e4c739 | ||
|
|
7993a7cdb0 | ||
|
|
567cb7d737 | ||
|
|
985128b537 | ||
|
|
cd35568e04 | ||
|
|
f612509cac | ||
|
|
f415190483 | ||
|
|
e00733a346 | ||
|
|
aafafa0e73 | ||
|
|
c87c9af12e | ||
|
|
622215715f | ||
|
|
c87250c028 | ||
|
|
d6b6d700a5 | ||
|
|
9d4e2c98a3 | ||
|
|
08094c2660 | ||
|
|
fda82c82b0 | ||
|
|
f0eabd4ea0 | ||
|
|
5a4d812146 | ||
|
|
bf156a13bd | ||
|
|
53d276a8fc | ||
|
|
978fa54518 | ||
|
|
31f82e58b5 | ||
|
|
5967f66e6d | ||
|
|
bea81b54ca | ||
|
|
6fd403bdca | ||
|
|
3d673d9d40 | ||
|
|
cac949de56 | ||
|
|
dffa152698 | ||
|
|
7796298fca | ||
|
|
5291bfe8d4 | ||
|
|
b364313297 | ||
|
|
2bef608e07 | ||
|
|
aee13ad909 | ||
|
|
9d82eba599 | ||
|
|
4852beb390 | ||
|
|
522c2f61c0 | ||
|
|
d331396afe | ||
|
|
c725cee044 | ||
|
|
367ef4ecb2 | ||
|
|
c3a64facd5 | ||
|
|
2671781e1b | ||
|
|
9291fa68aa | ||
|
|
6ebb3659f4 | ||
|
|
109696e965 | ||
|
|
b86bbd370c | ||
|
|
1575a4fb1a | ||
|
|
e2f500be90 | ||
|
|
284b00a826 | ||
|
|
66180e19b5 | ||
|
|
1531462d22 |
2
.github/workflows/build-image.yml
vendored
2
.github/workflows/build-image.yml
vendored
@@ -3,7 +3,7 @@ on:
|
||||
push:
|
||||
branches: ['v2-dev']
|
||||
paths:
|
||||
- "trigger/build1.trigger"
|
||||
- "trigger/build.trigger"
|
||||
|
||||
# schedule:
|
||||
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
|
||||
|
||||
19
.github/workflows/deploy-demo.yml
vendored
19
.github/workflows/deploy-demo.yml
vendored
@@ -1,9 +1,9 @@
|
||||
name: deploy-demo
|
||||
on:
|
||||
# push:
|
||||
# branches: ['v2-dev']
|
||||
# paths:
|
||||
# - "trigger/deploy.trigger"
|
||||
push:
|
||||
branches: ['v2-dev']
|
||||
paths:
|
||||
- "trigger/deploy.trigger"
|
||||
workflow_run:
|
||||
workflows: [ "build-image" ]
|
||||
types:
|
||||
@@ -55,14 +55,3 @@ jobs:
|
||||
retry-count: 3
|
||||
retry-delay: 5000
|
||||
|
||||
- name: deploy-certd-doc
|
||||
uses: tyrrrz/action-http-request@master
|
||||
with:
|
||||
url: http://flow-openapi.aliyun.com/pipeline/webhook/IiSxLDp9aOhgDUxJPytv
|
||||
method: POST
|
||||
body: |
|
||||
{}
|
||||
headers: |
|
||||
Content-Type: application/json
|
||||
retry-count: 3
|
||||
retry-delay: 5000
|
||||
|
||||
22
.github/workflows/release-image.yml
vendored
22
.github/workflows/release-image.yml
vendored
@@ -1,11 +1,11 @@
|
||||
name: build-image-for-release
|
||||
on:
|
||||
# push:
|
||||
# branches: ['v2-dev']
|
||||
# paths:
|
||||
# - "builder/release.trigger"
|
||||
push:
|
||||
branches: ['v2-dev']
|
||||
paths:
|
||||
- "trigger/release.trigger"
|
||||
# workflow_run:
|
||||
# workflows: [ "build-image" ]
|
||||
# workflows: [ "deploy-demo" ]
|
||||
# types:
|
||||
# - completed
|
||||
|
||||
@@ -117,3 +117,15 @@ jobs:
|
||||
# registry.cn-shenzhen.aliyuncs.com/handsfree/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||
# greper/certd-agent:latest
|
||||
# greper/certd-agent:${{steps.get_certd_version.outputs.result}}
|
||||
|
||||
- name: deploy-certd-doc
|
||||
uses: tyrrrz/action-http-request@master
|
||||
with:
|
||||
url: http://flow-openapi.aliyun.com/pipeline/webhook/IiSxLDp9aOhgDUxJPytv
|
||||
method: POST
|
||||
body: |
|
||||
{}
|
||||
headers: |
|
||||
Content-Type: application/json
|
||||
retry-count: 3
|
||||
retry-delay: 5000
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -29,4 +29,5 @@ test/**/*.js
|
||||
/packages/ui/certd-server/data/db.sqlite
|
||||
/packages/ui/certd-server/data/keys.yaml
|
||||
/packages/pro/
|
||||
test.js
|
||||
test.js
|
||||
.history
|
||||
4
.npmrc
4
.npmrc
@@ -1,2 +1,6 @@
|
||||
link-workspace-packages=deep
|
||||
prefer-workspace-packages=true
|
||||
better_sqlite3_binary_host=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better-sqlite3_binary_host=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
better-sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
|
||||
|
||||
38
.vscode/launch.json
vendored
38
.vscode/launch.json
vendored
@@ -10,8 +10,8 @@
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/packages/ui/certd-client",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run", "dev"],
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["dev"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
@@ -20,8 +20,38 @@
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/packages/ui/certd-server",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run", "dev"],
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["dev"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
{
|
||||
"name": "server-mysql",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/packages/ui/certd-server",
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["dev-mysql"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
{
|
||||
"name": "server-pg",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/packages/ui/certd-server",
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["dev-pg"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
{
|
||||
"name": "server-common",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceFolder}/packages/ui/certd-server",
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": ["dev-commpro"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
|
||||
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"eslint.debug": false,
|
||||
"eslint.format.enable": true
|
||||
"eslint.format.enable": true,
|
||||
"typescript.tsc.autoDetect": "watch",
|
||||
"git.scanRepositories": [
|
||||
"./packages/pro"
|
||||
]
|
||||
}
|
||||
49
CHANGELOG.md
49
CHANGELOG.md
@@ -3,6 +3,55 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复并发情况下证书申请日志混乱的bug ([bb2714f](https://github.com/certd/certd/commit/bb2714ff241f9db4a71d805b23a1b0f9f2f6413a))
|
||||
* 修复网络测试,telnet的bug ([c03a70f](https://github.com/certd/certd/commit/c03a70fde23c8e840bd0fdb4fcbca8990f6c65eb))
|
||||
* 修复站点证书监控,证书已经更新到最新日期了,仍然发出警告通知的bug ([1f42f93](https://github.com/certd/certd/commit/1f42f933f07860b27aa3d016e40916ff2b063eac))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 注册页面增加手机注册tab页签 ([6b2f1fc](https://github.com/certd/certd/commit/6b2f1fcd3e058061b814c3331cda8ce1b2d80d73))
|
||||
* 流水线创建时支持添加到证书监控 ([59ba408](https://github.com/certd/certd/commit/59ba4080706548828ef1c0a9cd893c1c9a7d591f))
|
||||
* 流水线支持有效期设置 ([911e69e](https://github.com/certd/certd/commit/911e69e3bc0cdd48b62953b5d0981d640fc1f8ac))
|
||||
* 群辉增加请求超时时长设置 ([b381492](https://github.com/certd/certd/commit/b3814920bdcabc911f860a8e19b5b9b3a04709ac))
|
||||
* 通知支持meow ([c77645e](https://github.com/certd/certd/commit/c77645e1733670214aaca5544cf8759d7e4adda4))
|
||||
* 站点证书监控增加导出和分组功能 ([2ed12c4](https://github.com/certd/certd/commit/2ed12c429eb58274a4f9dd0ed3b66e160d283ded))
|
||||
* 证书监控增加批量删除 ([e578c52](https://github.com/certd/certd/commit/e578c52fdf2f838038062aa4209b655fbae461fb))
|
||||
* esa 自动删除过期证书提示 ([8bf1f82](https://github.com/certd/certd/commit/8bf1f828b9eaa9208f32e8ee7460b86420fed0c7))
|
||||
* ssh 增加禁止-i参数提示 ([3a8931f](https://github.com/certd/certd/commit/3a8931feeffd7157163ff7d46b693e5e1a434b9c))
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复飞牛证书部署后无法生效的bug ([bf156a1](https://github.com/certd/certd/commit/bf156a13bd443cdadb73c9dff79bbef7231b4401))
|
||||
* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/certd/certd/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化start.sh脚本,去掉删除非ui目录的操作及提示 ([7993a7c](https://github.com/certd/certd/commit/7993a7cdb01885535950c63187e3f67d67ba2f75))
|
||||
* 增加飞牛证书id选择的提示 ([5a4d812](https://github.com/certd/certd/commit/5a4d8121462b1afe921d028465687be8c9679814))
|
||||
* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f))
|
||||
* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22))
|
||||
* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9))
|
||||
* dns支持新网互联 ([f415190](https://github.com/certd/certd/commit/f41519048326d971acd9e0a30462231f77a299a6))
|
||||
* start.sh脚本支持根据当前系统判断是否使用sudo ([567cb7d](https://github.com/certd/certd/commit/567cb7d737023e26ec58403c6f28f109e212d379))
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复版本比较bug ([109696e](https://github.com/certd/certd/commit/109696e965d68c50c8627ffd40203edd1d2daea5))
|
||||
* 修复某些情况下cname申请证书报错主域名不一致的bug ([2671781](https://github.com/certd/certd/commit/2671781e1bb0838981728d85eacf0e1a25a0fa48))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* cname主域名校验提示优化,显示不一致的两方便于排查问题 ([6ebb365](https://github.com/certd/certd/commit/6ebb3659f42155e4e8da600c493fb5227cd08137))
|
||||
* dns解析支持阿里esa ([9291fa6](https://github.com/certd/certd/commit/9291fa68aa7a88a05c2f888bf3048df36a8fbde3))
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -47,6 +47,8 @@ services:
|
||||
# 配置规则: certd_ + 配置项, 点号用_代替
|
||||
# #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,docker compose up -d 重建容器之后,管理员密码将改成123456,然后请及时修改回false
|
||||
- certd_system_resetAdminPasswd=false
|
||||
# ↓↓↓ 要使用ipv6,将此配置修改为::
|
||||
- certd_koa_hostname=0.0.0.0
|
||||
|
||||
# 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量
|
||||
# 注意: 选定使用一种数据库之后,不支持更换数据库。
|
||||
|
||||
@@ -95,10 +95,10 @@ export default defineConfig({
|
||||
},
|
||||
{
|
||||
text: "插件列表", items: [
|
||||
{text: "授权提供商", link: "/guide/plugins/access.md"},
|
||||
{text: "DNS提供商", link: "/guide/plugins/dns-provider.md"},
|
||||
{text: "任务插件", link: "/guide/plugins/deploy.md"},
|
||||
{text: "通知插件", link: "/guide/plugins/notification.md"},
|
||||
{text: "授权提供商", link: "/guide/plugins/access.md"},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@@ -3,6 +3,42 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复飞牛证书部署后无法生效的bug ([bf156a1](https://github.com/certd/certd/commit/bf156a13bd443cdadb73c9dff79bbef7231b4401))
|
||||
* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/certd/certd/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 优化start.sh脚本,去掉删除非ui目录的操作及提示 ([7993a7c](https://github.com/certd/certd/commit/7993a7cdb01885535950c63187e3f67d67ba2f75))
|
||||
* 增加飞牛证书id选择的提示 ([5a4d812](https://github.com/certd/certd/commit/5a4d8121462b1afe921d028465687be8c9679814))
|
||||
* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f))
|
||||
* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22))
|
||||
* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9))
|
||||
* dns支持新网互联 ([f415190](https://github.com/certd/certd/commit/f41519048326d971acd9e0a30462231f77a299a6))
|
||||
* start.sh脚本支持根据当前系统判断是否使用sudo ([567cb7d](https://github.com/certd/certd/commit/567cb7d737023e26ec58403c6f28f109e212d379))
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复版本比较bug ([109696e](https://github.com/certd/certd/commit/109696e965d68c50c8627ffd40203edd1d2daea5))
|
||||
* 修复某些情况下cname申请证书报错主域名不一致的bug ([2671781](https://github.com/certd/certd/commit/2671781e1bb0838981728d85eacf0e1a25a0fa48))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* cname主域名校验提示优化,显示不一致的两方便于排查问题 ([6ebb365](https://github.com/certd/certd/commit/6ebb3659f42155e4e8da600c493fb5227cd08137))
|
||||
* dns解析支持阿里esa ([9291fa6](https://github.com/certd/certd/commit/9291fa68aa7a88a05c2f888bf3048df36a8fbde3))
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
### Features
|
||||
|
||||
* @certd/ui-server module import报错的问题 ([0c61d4c](https://github.com/certd/certd/commit/0c61d4c9788677c83c567db5381b9e257ec90bba))
|
||||
* dist打包前检查 ([8f6e5bd](https://github.com/certd/certd/commit/8f6e5bd24b3b65fbfcba36c08f532a3abad2d606))
|
||||
|
||||
## [1.36.25](https://github.com/certd/certd/compare/v1.36.24...v1.36.25) (2025-09-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
@@ -5,6 +5,9 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
|
||||
|
||||
关键字:证书自动申请、证书自动更新、证书自动续期、证书自动续签、证书管理工具
|
||||
|
||||
|
||||

|
||||
|
||||
## 1、关于证书续期
|
||||
>* 实际上没有办法不改变证书文件本身情况下直接续期或者续签。
|
||||
>* 我们所说的续期,其实就是按照全套流程重新申请一份新证书,然后重新部署上去。
|
||||
@@ -15,7 +18,7 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
|
||||
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
|
||||
|
||||
* 全自动申请证书(支持所有注册商注册的域名,支持DNS-01、HTTP-01、CNAME代理等多种域名验证方式)
|
||||
* 全自动部署更新证书(目前支持部署到主机、阿里云、腾讯云等70+部署插件)
|
||||
* 全自动部署更新证书(目前支持部署到主机、阿里云、腾讯云等100+部署插件)
|
||||
* 支持通配符域名/泛域名,支持多个域名打到一个证书上,支持pem、pfx、der、jks等多种证书格式
|
||||
* 邮件通知、webhook通知、企微、钉钉、飞书、anpush等多种通知方式
|
||||
* 私有化部署,数据保存本地,安装升级非常简单快捷
|
||||
|
||||
@@ -11,9 +11,12 @@
|
||||
git clone https://github.com/certd/certd --depth=1
|
||||
# git checkout v1.x.x # 当v2主干分支代码无法正常启动时,可以尝试此命令,1.x.x换成最新版本号
|
||||
cd certd
|
||||
|
||||
# 启动服务
|
||||
./start.sh
|
||||
|
||||
|
||||
|
||||
```
|
||||
>如果是windows,请先安装`git for windows` ,然后右键,选择`open git bash here`打开终端,再执行`./start.sh`命令
|
||||
|
||||
|
||||
@@ -2,50 +2,67 @@
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 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授权** | |
|
||||
| 1.| **主机登录授权** | |
|
||||
| 2.| **阿里云授权** | |
|
||||
| 3.| **阿里云ESA授权** | |
|
||||
| 4.| **腾讯云** | |
|
||||
| 5.| **华为云授权** | |
|
||||
| 6.| **火山引擎** | |
|
||||
| 7.| **京东云** | |
|
||||
| 8.| **七牛云授权** | |
|
||||
| 9.| **天翼云授权** | |
|
||||
| 10.| **baota授权** | |
|
||||
| 11.| **百度云授权** | |
|
||||
| 12.| **EAB授权** | ZeroSSL证书申请需要EAB授权 |
|
||||
| 13.| **google cloud** | 谷歌云授权 |
|
||||
| 14.| **SFTP授权** | |
|
||||
| 15.| **阿里云OSS授权** | 包含地域和Bucket |
|
||||
| 16.| **FTP授权** | |
|
||||
| 17.| **腾讯云COS授权** | 腾讯云对象存储授权,包含地域和存储桶 |
|
||||
| 18.| **七牛OSS授权** | |
|
||||
| 19.| **s3/minio授权** | S3/minio oss授权 |
|
||||
| 20.| **宝塔云WAF授权** | 用于连接和管理宝塔云WAF服务的授权配置 |
|
||||
| 21.| **易盾DCDN授权** | https://user.yiduncdn.com |
|
||||
| 22.| **易盾rcdn授权** | 易盾CDN,每月免费30G,[注册即领](https://rhcdn.yiduncdn.com/register?code=8mn536rrzfbf8) |
|
||||
| 23.| **易发云短信** | sms.yfyidc.cn/ |
|
||||
| 24.| **cdnfly授权** | |
|
||||
| 25.| **群晖登录授权** | |
|
||||
| 26.| **k8s授权** | |
|
||||
| 27.| **1panel授权** | 账号和密码 |
|
||||
| 28.| **LeCDN授权** | |
|
||||
| 29.| **白山云授权** | |
|
||||
| 30.| **plesk授权** | |
|
||||
| 31.| **易支付** | |
|
||||
| 32.| **支付宝** | |
|
||||
| 33.| **微信支付** | |
|
||||
| 34.| **长亭雷池授权** | |
|
||||
| 35.| **lucky** | |
|
||||
| 36.| **括彩云cdn授权** | 括彩云CDN,每月免费30G,[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
|
||||
| 37.| **uniCloud** | unicloud授权 |
|
||||
| 38.| **猫云授权** | |
|
||||
| 39.| **西部数码授权** | |
|
||||
| 40.| **多吉云** | |
|
||||
| 41.| **我爱云授权** | 我爱云CDN |
|
||||
| 42.| **CacheFly** | CacheFly |
|
||||
| 43.| **Gcore** | Gcore |
|
||||
| 44.| **亚马逊云aws授权** | |
|
||||
| 45.| **亚马逊云科技(国区)授权** | |
|
||||
| 46.| **dns.la授权** | |
|
||||
| 47.| **又拍云** | |
|
||||
| 48.| **51dns授权** | |
|
||||
| 49.| **FlexCDN授权** | |
|
||||
| 50.| **farcdn授权** | |
|
||||
| 51.| **cloudflare授权** | |
|
||||
| 52.| **Github授权** | |
|
||||
| 53.| **namesilo授权** | |
|
||||
| 54.| **proxmox** | |
|
||||
| 55.| **网宿授权** | |
|
||||
| 56.| **金山云授权** | |
|
||||
| 57.| **APISIX授权** | |
|
||||
| 58.| **Dokploy授权** | |
|
||||
| 59.| **godaddy授权** | |
|
||||
| 60.| **新网授权** | |
|
||||
| 61.| **雨云授权** | https://app.rainyun.com/ |
|
||||
|
||||
<style module>
|
||||
table th:first-of-type {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 任务插件
|
||||
共 `70` 款任务插件
|
||||
共 `102` 款任务插件
|
||||
## 1. 证书申请
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -15,6 +15,8 @@
|
||||
| 2.| **IIS-部署到IIS站点** | |
|
||||
| 3.| **主机-执行远程主机脚本命令** | 可以执行重启nginx等操作让证书生效 |
|
||||
| 4.| **主机-部署证书到SSH主机** | SFTP上传证书到主机,然后SSH执行部署脚本命令 |
|
||||
| 5.| **主机-复制到本机** | 【仅管理员使用】实际上是复制证书到docker容器内的某个路径,需要做目录映射到宿主机 |
|
||||
| 6.| **上传证书到对象存储OSS** | 支持阿里云OSS、腾讯云COS、七牛云KODO、S3、MinIO、FTP、SFTP |
|
||||
## 3. CDN
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -22,33 +24,44 @@
|
||||
| 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.| **LeCDN-更新证书** | |
|
||||
| 5.| **LeCDN-更新证书V2** | 支持新版本LeCDN |
|
||||
| 6.| **白山云-更新证书** | |
|
||||
| 7.| **天翼云-部署证书到CDN** | 部署证书到天翼云CDN和全站加速 |
|
||||
| 8.| **括彩云-部署到括彩云CDN** | 括彩云CDN,每月免费30G,[注册即领](https://kuocaicdn.com/register?code=8mn536rrzfbf8) |
|
||||
| 9.| **多吉云-部署到多吉云CDN** | |
|
||||
| 10.| **我爱云-部署证书到我爱云CDN** | 部署证书到我爱云CDN |
|
||||
| 11.| **CacheFly-部署证书到CacheFly** | 部署证书到 CacheFly |
|
||||
| 12.| **Gcore-部署证书到Gcore** | 仅上传 并不会部署到cdn |
|
||||
| 13.| **Gcore-刷新Gcore证书** | 刷新现有的证书 |
|
||||
| 14.| **又拍云-部署证书到CDN/USS** | 支持又拍云CDN,又拍云云存储USS |
|
||||
| 15.| **FlexCDN-更新证书** | |
|
||||
| 16.| **farcdn-更新证书** | www.farcdn.net |
|
||||
| 17.| **雨云-更新证书** | app.rainyun.com |
|
||||
| 18.| **网宿-更新证书** | 网宿证书自动更新 |
|
||||
| 19.| **金山云-更新CDN证书** | 金山云自动更新CDN证书 |
|
||||
| 20.| **APISIX-更新证书** | 自动更新APISIX证书 |
|
||||
## 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 |
|
||||
| 2.| **宝塔-网站证书部署** | 部署宝塔管理的站点的ssl证书,目前支持网站站点、docker站点等。本插件也支持aaPanel。 |
|
||||
| 3.| **宝塔-WAF证书部署** | 部署宝塔云WAF/aaWAF |
|
||||
| 4.| **宝塔win-网站证书部署** | 部署到Windows版宝塔管理的站点的ssl证书 |
|
||||
| 5.| **宝塔-删除过期证书** | 删除证书夹中过期证书 |
|
||||
| 6.| **群晖-部署证书到群晖面板** | Synology,支持6.x以上版本 |
|
||||
| 7.| **K8S-部署证书到Secret** | 部署证书到k8s的secret |
|
||||
| 8.| **K8S-Ingress 证书部署** | 部署证书到k8s的Ingress |
|
||||
| 9.| **1Panel-部署证书到1Panel** | 更新1Panel的证书 |
|
||||
| 10.| **Plesk-部署Plesk网站证书** | |
|
||||
| 11.| **雷池-更新证书** | 更新长亭雷池WAF的证书 |
|
||||
| 12.| **lucky-更新Lucky证书** | |
|
||||
| 13.| **uniCloud-部署到服务空间** | 部署到服务空间 |
|
||||
| 14.| **威联通-部署证书到威联通** | 部署证书到qnap |
|
||||
| 15.| **飞牛NAS-部署证书** | |
|
||||
| 16.| **Proxmox-上传证书到Proxmox** | |
|
||||
| 17.| **Dokploy-更新证书** | 自动更新Dokploy证书 |
|
||||
## 5. 阿里云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -57,18 +70,24 @@
|
||||
| 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.| **阿里云-上传证书到阿里云** | 如果不想在阿里云上同一份证书上传多次,可以把此任务作为前置任务,其他阿里云任务证书那一项选择此任务的输出 |
|
||||
| 5.| **阿里云-部署证书至OSS** | 部署域名证书至阿里云OSS自定义域名,不是上传到阿里云oss |
|
||||
| 6.| **阿里云-上传证书到阿里云CAS** | 上传证书到阿里云数字证书管理服务(CAS),注意:不会部署到任何应用上;如果不想在阿里云上同一份证书上传多次,可以把此任务作为前置任务,其他阿里云任务证书那一项选择此任务的输出 |
|
||||
| 7.| **阿里云-部署至阿里云WAF** | 部署证书到阿里云WAF |
|
||||
| 8.| **阿里云-部署至ALB(应用负载均衡)** | ALB,更新监听器的默认证书 |
|
||||
| 9.| **阿里云-部署至NLB(网络负载均衡)** | NLB,网络负载均衡,更新监听器的默认证书 |
|
||||
| 10.| **阿里云-部署至SLB(传统负载均衡)** | 部署证书到阿里云SLB(传统负载均衡) |
|
||||
| 11.| **阿里云-部署至阿里云FC(3.0)** | 部署证书到阿里云函数计算(FC3.0),【注意】证书的加密算法必须选择【pkcs1旧版】 |
|
||||
| 10.| **阿里云-部署至CLB(传统负载均衡)** | 部署证书到阿里云CLB(传统负载均衡) |
|
||||
| 11.| **阿里云-部署至阿里云FC(3.0)** | 部署证书到阿里云函数计算(FC3.0) |
|
||||
| 12.| **阿里云-部署至ESA** | 部署证书到阿里云ESA(边缘安全加速) |
|
||||
| 13.| **阿里云-部署至VOD** | 部署证书到阿里云视频点播(vod) |
|
||||
| 14.| **阿里云-部署证书至API网关** | 自动部署域名证书至阿里云API网关(APIGateway) |
|
||||
| 15.| **阿里云-部署至云原生API网关/AI网关** | 自动部署域名证书至云原生API网关、AI网关 |
|
||||
## 6. 华为云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **华为云-部署证书至CDN** | |
|
||||
| 2.| **华为云-上传证书至CCM** | 上传证书到华为云CCM |
|
||||
| 3.| **华为云-部署证书至OBS** | |
|
||||
## 7. 腾讯云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -79,9 +98,15 @@
|
||||
| 4.| **腾讯云-部署到CDN-v2** | 推荐使用 |
|
||||
| 5.| **腾讯云-上传证书到腾讯云** | 上传成功后输出:tencentCertId |
|
||||
| 6.| **腾讯云-部署证书到COS** | 部署到腾讯云COS源站域名证书【注意:很不稳定,需要重试很多次偶尔才能成功一次】 |
|
||||
| 7.| **腾讯云-部署到腾讯云EO** | 腾讯云边缘安全加速平台EO,必须配置上传证书到腾讯云任务 |
|
||||
| 7.| **腾讯云-部署到腾讯云EO** | 腾讯云边缘安全加速平台EdgeOne(EO),必须配置上传证书到腾讯云任务 |
|
||||
| 8.| **腾讯云-删除即将过期证书** | 仅删除未使用的证书 |
|
||||
| 9.| **腾讯云-部署到TKE-ingress** | serverless集群请使用K8S部署插件;Qcloud类型需要【上传到腾讯云】作为前置任务;ApiServer未开启外网访问则需要做域名的内网IP映射 |
|
||||
| 9.| **腾讯云-部署到TKE** | 修改TKE集群密钥配置,支持Opaque和TLS证书类型。注意:
|
||||
1. serverless集群请使用K8S部署插件;
|
||||
2. Opaque类型需要【上传到腾讯云】作为前置任务;
|
||||
3. ApiServer需要开通公网访问(或者certd可访问),实际上底层仍然是通过KubeClient进行部署 |
|
||||
| 10.| **腾讯云-部署到腾讯云直播** | https://console.cloud.tencent.com/live/ |
|
||||
| 11.| **腾讯云-实例开关机** | 腾讯云实例开关机 |
|
||||
| 12.| **腾讯云-更新证书(Id不变)** | 根据证书id一键更新腾讯云证书并自动部署(Id不变),注意该接口为腾讯云白名单功能,非白名单用户无法使用该功能 |
|
||||
## 8. 火山引擎
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -91,6 +116,8 @@
|
||||
| 3.| **火山引擎-上传证书至证书中心** | 上传证书至火山引擎证书中心 |
|
||||
| 4.| **火山引擎-部署证书至ALB** | 部署至火山引擎应用负载均衡 |
|
||||
| 5.| **火山引擎-部署证书至Live** | 部署至火山引擎视频直播 |
|
||||
| 6.| **火山引擎-部署证书至DCDN** | 部署至火山引擎全站加速 |
|
||||
| 7.| **火山引擎-部署证书至VOD** | 部署至火山引擎视频点播(暂不可用) |
|
||||
## 9. 京东云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
@@ -98,26 +125,43 @@
|
||||
| 1.| **京东云-部署证书至CDN** | 京东云内容分发网络 |
|
||||
| 2.| **京东云-更新已有证书** | 更新SSL数字证书中的证书 |
|
||||
| 3.| **京东云-上传新证书** | 上传证书到SSL数字证书中心 |
|
||||
## 10. 七牛云
|
||||
## 10. 百度云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **百度云-部署证书到CDN** | 部署到百度云CDN |
|
||||
| 2.| **百度云-部署证书到负载均衡** | 部署到百度云负载均衡,包括BLB、APPBLB |
|
||||
| 3.| **百度云-上传到证书托管** | 上传证书到百度云证书托管中心 |
|
||||
## 11. 七牛云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **七牛云-部署证书至OSS** | 自动部署域名证书至七牛云KODO,注意是自定义源站域名,不是CDN域名 |
|
||||
| 2.| **七牛云-部署证书至CDN** | 自动部署域名证书至七牛云CDN |
|
||||
## 11. 亚马逊云
|
||||
| 2.| **七牛云-部署证书至CDN/DCDN** | 自动部署域名证书至七牛云CDN、DCDN |
|
||||
| 3.| **七牛云-上传证书到七牛云** | 上传到七牛云 |
|
||||
## 12. 亚马逊云
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **AWS-部署证书到CloudFront** | 部署证书到 AWS CloudFront |
|
||||
## 12. 其他
|
||||
| 2.| **AWS-上传证书到ACM** | 上传证书 AWS ACM |
|
||||
| 3.| **AWS(国区)-部署证书到CloudFront** | 部署证书到 AWS CloudFront |
|
||||
## 13. 其他
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **Demo-测试插件** | |
|
||||
| 2.| **重启 Certd** | 【仅管理员可用】 重启 certd的https服务,用于更新 Certd 的 ssl 证书 |
|
||||
| 3.| **自定义js脚本** | 【仅管理员】运行自定义js脚本执行 |
|
||||
| 4.| **等待** | 等待一段时间 |
|
||||
| 5.| **数据库备份** | 仅支持备份SQLite数据库 |
|
||||
| 2.| **等待** | 等待一段时间 |
|
||||
| 3.| **邮件发送证书** | 通过邮件发送证书 |
|
||||
| 4.| **webhook方式部署证书** | 调用webhook部署证书 |
|
||||
| 5.| **Github-检查Release版本** | 检查最新Release版本并推送消息 |
|
||||
## 14. 管理
|
||||
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **重启 Certd** | 【仅管理员可用】 重启 certd的https服务,用于更新 Certd 的 ssl 证书 |
|
||||
| 2.| **自定义js脚本** | 【仅管理员】运行自定义js脚本执行 |
|
||||
| 3.| **数据库备份** | 【仅管理员可用】仅支持备份SQLite数据库 |
|
||||
|
||||
<style module>
|
||||
table th:first-of-type {
|
||||
|
||||
@@ -3,13 +3,19 @@
|
||||
| 序号 | 名称 | 说明 |
|
||||
|-----|-----|-----|
|
||||
| 1.| **阿里云** | 阿里云DNS解析提供商 |
|
||||
| 2.| **腾讯云** | 腾讯云域名DNS解析提供者 |
|
||||
| 3.| **华为云** | 华为云DNS解析提供商 |
|
||||
| 4.| **西部数码** | west dns provider |
|
||||
| 5.| **dns.la** | dns.la |
|
||||
| 6.| **火山引擎** | 火山引擎DNS解析提供商 |
|
||||
| 7.| **京东云** | 京东云DNS解析提供商 |
|
||||
| 8.| **51dns** | 51DNS |
|
||||
| 2.| **阿里ESA** | 阿里ESA DNS解析 |
|
||||
| 3.| **火山引擎** | 火山引擎DNS解析提供商 |
|
||||
| 4.| **京东云** | 京东云DNS解析提供商 |
|
||||
| 5.| **新网** | 新网域名解析 |
|
||||
| 6.| **腾讯云** | 腾讯云域名DNS解析提供者 |
|
||||
| 7.| **华为云** | 华为云DNS解析提供商 |
|
||||
| 8.| **西部数码** | west dns provider |
|
||||
| 9.| **dns.la** | dns.la |
|
||||
| 10.| **雨云** | 雨云DNS解析提供商 |
|
||||
| 11.| **cloudflare** | cloudflare dns provider |
|
||||
| 12.| **namesilo** | namesilo dns provider |
|
||||
| 13.| **godaddy** | GoDaddy |
|
||||
| 14.| **51dns** | 51DNS |
|
||||
|
||||
<style module>
|
||||
table th:first-of-type {
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
| 10.| **Slack通知** | Slack消息推送通知 |
|
||||
| 11.| **Bark 通知** | Bark 推送通知插件 |
|
||||
| 12.| **飞书通知** | 飞书群聊webhook通知 |
|
||||
| 13.| **钉钉通知** | 钉钉群聊通知 |
|
||||
| 14.| **VoceChat通知** | https://voce.chat |
|
||||
| 15.| **OneBot V11 通知** | 通过动态拼接URL发送 OneBot V11 协议消息 |
|
||||
|
||||
<style module>
|
||||
table th:first-of-type {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"detail": too many certificates (5) already issued for this exact set of idantifiers in the last 168hm0s
|
||||
```
|
||||
|
||||
## ssl.com报错 CAA record does not include ssl.com which is required to issue the certificate
|
||||
## 4. ssl.com报错 CAA record does not include ssl.com which is required to issue the certificate
|
||||
ssl.com申请证书要求必须设置CAA记录,表示允许ssl.com为该域名颁发证书
|
||||
请按如下格式添加CAA记录
|
||||
|
||||
@@ -29,5 +29,18 @@ ssl.com申请证书要求必须设置CAA记录,表示允许ssl.com为该域名
|
||||
| 一级泛域名 | CAA | * | 0 | issue/issuewild | "ssl.com" |
|
||||
| 固定子域名 | CAA | sub | 0 | issue |"ssl.com" |
|
||||
|
||||
## 5. address family not supported
|
||||
启动时出现此错误,是由于您的服务器不支持绑定ipv6地址
|
||||
|
||||
请配置环境变量 certd_koa_hostname=0.0.0.0
|
||||
|
||||
在docker-compose.yml中添加如下配置
|
||||
|
||||
```yaml
|
||||
service:
|
||||
certd:
|
||||
environment:
|
||||
certd_koa_hostname: 0.0.0.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,16 @@
|
||||
|
||||
https://certd.handsfree.work/
|
||||
|
||||
> 注意数据将不定期清理,不定期停止定时任务,生产使用请自行部署
|
||||
注册 -> 创建证书流水线 -> 添加部署任务 -> 测试运行
|
||||
|
||||
> 注意demo的数据将不定期清理,生产使用请自行部署
|
||||
> 包含敏感信息,务必自己本地部署进行生产使用
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## 二、私有化部署
|
||||
|
||||
由于证书、授权信息等属于高度敏感数据,请务必私有化部署,保障数据安全
|
||||
|
||||
BIN
docs/images/start/home-2.png
Normal file
BIN
docs/images/start/home-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
@@ -24,13 +24,13 @@ features:
|
||||
- title: 全自动申请证书
|
||||
details: 支持所有注册商注册的域名
|
||||
- title: 全自动部署证书
|
||||
details: 支持部署到主机、阿里云、腾讯云等,目前已支持60+部署插件
|
||||
details: 支持部署到主机、阿里云、腾讯云等,目前已支持100+部署插件
|
||||
- title: 多域名、泛域名打到一个证书上
|
||||
details: 支持通配符域名/泛域名,支持多个域名打到一个证书上
|
||||
- title: 多证书格式支持
|
||||
details: 支持pem、pfx、der、jks等多种证书格式,支持Google、Letsencrypt、ZeroSSL证书颁发机构
|
||||
- title: 支持私有化部署
|
||||
details: 授权数据加密存储,保障数据安全
|
||||
- title: 多数据库支持
|
||||
details: 支持SQLite、Postgresql、MySQL数据库
|
||||
- title: 私有化部署,数据安全
|
||||
details: 授权数据加密存储,保障数据安全,支持SQLite、Postgresql、MySQL多种数据库
|
||||
- title: 无痛升级
|
||||
details: 有手就行,向下兼容,无需担心数据作废
|
||||
---
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.37.0"
|
||||
"version": "1.37.3"
|
||||
}
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
"devb": "lerna run dev-build",
|
||||
"i-all": "lerna link && lerna exec npm install ",
|
||||
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits --create-release github && npm run afterpublishOnly && npm run commitAll",
|
||||
"afterpublishOnly": "npm run copylogs && time /t >build.trigger && git add ./build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
|
||||
"afterpublishOnly": "npm run plugin-doc-gen && npm run copylogs && time /t >trigger/build.trigger && git add ./trigger/build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
|
||||
"transform-sql": "cd ./packages/ui/certd-server/db/ && node --experimental-json-modules transform.js",
|
||||
"plugin-doc-gen": "cd ./packages/ui/certd-server/ && npm run export-md",
|
||||
"commitAll": "git add . && git commit -m \"build: publish\" && git push && npm run commitPro",
|
||||
"commitPro": "cd ./packages/pro/ && git add . && git commit -m \"build: publish\" && git push",
|
||||
"copylogs": "copyfiles \"CHANGELOG.md\" ./docs/guide/changelogs/",
|
||||
@@ -33,7 +34,9 @@
|
||||
"docs:dev": "vitepress dev docs",
|
||||
"docs:build": "npm run copylogs && vitepress build docs",
|
||||
"docs:preview": "vitepress preview docs",
|
||||
"pub": "echo 1"
|
||||
"pub": "echo 1",
|
||||
"dev": "pnpm run -r --parallel compile ",
|
||||
"release": "time /t >trigger/release.trigger && git add trigger/release.trigger && git commit -m \"build: release\" && git push"
|
||||
},
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/publishlab/node-acme-client/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复并发情况下证书申请日志混乱的bug ([bb2714f](https://github.com/publishlab/node-acme-client/commit/bb2714ff241f9db4a71d805b23a1b0f9f2f6413a))
|
||||
|
||||
## [1.37.2](https://github.com/publishlab/node-acme-client/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* aliyunoss 选择证书接入点选择新加坡无法上传的bug ([e00733a](https://github.com/publishlab/node-acme-client/commit/e00733a34644c23ffe926486b15dc96bf2fa4b57))
|
||||
|
||||
## [1.37.1](https://github.com/publishlab/node-acme-client/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
# [1.37.0](https://github.com/publishlab/node-acme-client/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@peculiar/x509": "^1.11.0",
|
||||
"asn1js": "^3.0.5",
|
||||
"axios": "^1.7.2",
|
||||
@@ -52,7 +52,8 @@
|
||||
"lint-types": "tsd",
|
||||
"prepublishOnly": "npm run build-docs",
|
||||
"test": "mocha -t 60000 \"test/setup.js\" \"test/**/*.spec.js\"",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -69,5 +70,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ class AcmeApi {
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(locationUrl, mapping);
|
||||
return locationUrl;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
* ACME auto helper
|
||||
*/
|
||||
import { readCsrDomains } from "./crypto/index.js";
|
||||
import { log } from "./logger.js";
|
||||
import { wait } from "./wait.js";
|
||||
import { CancelError } from "./error.js";
|
||||
|
||||
@@ -45,6 +44,9 @@ export default async (client, userOpts) => {
|
||||
accountPayload.externalAccountBinding = opts.externalAccountBinding;
|
||||
}
|
||||
|
||||
const log = (...args)=>{
|
||||
return client.logger.info(...args);
|
||||
}
|
||||
/**
|
||||
* Register account
|
||||
*/
|
||||
@@ -255,7 +257,7 @@ export default async (client, userOpts) => {
|
||||
await wait(waitDnsDiffuseTime * 1000)
|
||||
}
|
||||
|
||||
log("开始向提供商请求挑战验证");
|
||||
log("开始向提供商请求检查验证");
|
||||
await runPromisePa(completeChallengeTasks, 1000);
|
||||
} catch (e) {
|
||||
log(`证书申请失败${e.message}`);
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
*/
|
||||
import axios from 'axios';
|
||||
import { parseRetryAfterHeader } from './util.js';
|
||||
import { log } from './logger.js';
|
||||
const { AxiosError } = axios;
|
||||
import {getGlobalAgents, HttpError} from '@certd/basic'
|
||||
import { log } from './logger.js';
|
||||
/**
|
||||
* Defaults
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
import { createHash } from 'crypto';
|
||||
import { getPemBodyAsB64u } from './crypto/index.js';
|
||||
import { log } from './logger.js';
|
||||
import HttpClient from './http.js';
|
||||
import AcmeApi from './api.js';
|
||||
import verify from './verify.js';
|
||||
@@ -104,8 +103,13 @@ class AcmeClient {
|
||||
max: this.opts.backoffMax,
|
||||
};
|
||||
|
||||
this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping);
|
||||
this.http = new HttpClient(this.opts.directoryUrl, this.opts.accountKey, this.opts.externalAccountBinding, this.opts.urlMapping, opts.logger);
|
||||
this.api = new AcmeApi(this.http, this.opts.accountUrl);
|
||||
this.logger = opts.logger;
|
||||
}
|
||||
|
||||
log(...args) {
|
||||
this.logger.info(...args);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,7 +181,7 @@ class AcmeClient {
|
||||
this.getAccountUrl();
|
||||
|
||||
/* Account URL exists */
|
||||
log('Account URL exists, returning updateAccount()');
|
||||
this.log('Account URL exists, returning updateAccount()');
|
||||
return this.updateAccount(data);
|
||||
}
|
||||
catch (e) {
|
||||
@@ -185,7 +189,7 @@ class AcmeClient {
|
||||
|
||||
/* HTTP 200: Account exists */
|
||||
if (resp.status === 200) {
|
||||
log('Account already exists (HTTP 200), returning updateAccount()');
|
||||
this.log('Account already exists (HTTP 200), returning updateAccount()');
|
||||
return this.updateAccount(data);
|
||||
}
|
||||
|
||||
@@ -214,7 +218,7 @@ class AcmeClient {
|
||||
this.api.getAccountUrl();
|
||||
}
|
||||
catch (e) {
|
||||
log('No account URL found, returning createAccount()');
|
||||
this.log('No account URL found, returning createAccount()');
|
||||
return this.createAccount(data);
|
||||
}
|
||||
|
||||
@@ -502,7 +506,7 @@ class AcmeClient {
|
||||
await verify[challenge.type](authz, challenge, keyAuthorization);
|
||||
};
|
||||
|
||||
log('Waiting for ACME challenge verification(等待ACME挑战验证)');
|
||||
this.log('Waiting for ACME challenge verification(等待ACME检查验证)');
|
||||
return util.retry(verifyFn, this.backoffOpts);
|
||||
}
|
||||
|
||||
@@ -570,7 +574,7 @@ class AcmeClient {
|
||||
const resp = await this.api.apiRequest(item.url, null, [200]);
|
||||
|
||||
/* Verify status */
|
||||
log(`[${d}] Item has status(挑战状态): ${resp.data.status}`);
|
||||
this.log(`[${d}] Item has status(检查状态): ${resp.data.status}`);
|
||||
|
||||
if (invalidStates.includes(resp.data.status)) {
|
||||
abort();
|
||||
@@ -586,7 +590,7 @@ class AcmeClient {
|
||||
throw new Error(`[${d}] Unexpected item status: ${resp.data.status}`);
|
||||
};
|
||||
|
||||
log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, this.backoffOpts);
|
||||
this.log(`[${d}] Waiting for valid status (等待valid状态): ${item.url}`, this.backoffOpts);
|
||||
return util.retry(verifyFn, this.backoffOpts);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { getJwk } from './crypto/index.js';
|
||||
*/
|
||||
|
||||
class HttpClient {
|
||||
constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {}) {
|
||||
constructor(directoryUrl, accountKey, externalAccountBinding = {}, urlMapping = {},logger) {
|
||||
this.directoryUrl = directoryUrl;
|
||||
this.accountKey = accountKey;
|
||||
this.externalAccountBinding = externalAccountBinding;
|
||||
@@ -31,6 +31,7 @@ class HttpClient {
|
||||
this.directoryMaxAge = 86400;
|
||||
this.directoryTimestamp = 0;
|
||||
this.urlMapping = urlMapping;
|
||||
this.log = logger? logger.info.bind(logger) : log;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,7 @@ class HttpClient {
|
||||
for (const key in this.urlMapping.mappings) {
|
||||
if (url.includes(key)) {
|
||||
const newUrl = url.replace(key, this.urlMapping.mappings[key]);
|
||||
log(`use reverse proxy: ${newUrl}`);
|
||||
this.log(`use reverse proxy: ${newUrl}`);
|
||||
url = newUrl;
|
||||
}
|
||||
}
|
||||
@@ -65,10 +66,10 @@ class HttpClient {
|
||||
opts.headers['Content-Type'] = 'application/jose+json';
|
||||
|
||||
/* Request */
|
||||
log(`HTTP request: ${method} ${url}`);
|
||||
this.log(`HTTP request: ${method} ${url}`);
|
||||
const resp = await axios.request(opts);
|
||||
|
||||
log(`RESP ${resp.status} ${method} ${url}`);
|
||||
this.log(`RESP ${resp.status} ${method} ${url}`);
|
||||
return resp;
|
||||
}
|
||||
|
||||
@@ -85,7 +86,7 @@ class HttpClient {
|
||||
const age = (now - this.directoryTimestamp);
|
||||
|
||||
if (!this.directoryCache || (age > this.directoryMaxAge)) {
|
||||
log(`Refreshing ACME directory, age: ${age}`);
|
||||
this.log(`Refreshing ACME directory, age: ${age}`);
|
||||
const resp = await this.request(this.directoryUrl, 'get');
|
||||
|
||||
if (resp.status >= 400) {
|
||||
@@ -187,7 +188,7 @@ class HttpClient {
|
||||
|
||||
/* Nonce */
|
||||
if (nonce) {
|
||||
log(`Using nonce: ${nonce}`);
|
||||
this.log(`Using nonce: ${nonce}`);
|
||||
header.nonce = nonce;
|
||||
}
|
||||
|
||||
@@ -314,7 +315,7 @@ class HttpClient {
|
||||
nonce = resp.headers['replay-nonce'] || null;
|
||||
attempts += 1;
|
||||
|
||||
log(`Caught invalid nonce error, retrying (${attempts}/${this.maxBadNonceRetries}) signed request to: ${url}`);
|
||||
this.log(`Caught invalid nonce error, retrying (${attempts}/${this.maxBadNonceRetries}) signed request to: ${url}`);
|
||||
return this.signedRequest(url, payload, { kid, nonce, includeExternalAccountBinding }, attempts);
|
||||
}
|
||||
|
||||
|
||||
1
packages/core/acme-client/types/index.d.ts
vendored
1
packages/core/acme-client/types/index.d.ts
vendored
@@ -49,6 +49,7 @@ export interface ClientOptions {
|
||||
backoffMax?: number;
|
||||
urlMapping?: UrlMapping;
|
||||
signal?: AbortSignal;
|
||||
logger?:any
|
||||
}
|
||||
|
||||
export interface ClientExternalAccountBindingOptions {
|
||||
|
||||
@@ -3,6 +3,20 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22))
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
@@ -1 +1 @@
|
||||
12:14
|
||||
01:10
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -13,7 +13,8 @@
|
||||
"dev-build": "npm run build",
|
||||
"preview": "vite preview",
|
||||
"test": "mocha --loader=ts-node/esm",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.7.2",
|
||||
@@ -45,5 +46,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export * from './utils/index.js';
|
||||
export * from './utils/util.id.js';
|
||||
export * from "./utils/index.js";
|
||||
|
||||
@@ -37,6 +37,9 @@ import { mitter } from "./util.mitter.js";
|
||||
|
||||
import * as request from "./util.request.js";
|
||||
export * from "./util.cache.js";
|
||||
|
||||
export * from "./util.id.js";
|
||||
|
||||
export const utils = {
|
||||
sleep,
|
||||
http,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
//转换为import
|
||||
import childProcess from 'child_process';
|
||||
import { safePromise } from './util.promise.js';
|
||||
import { ILogger, logger } from './util.log.js';
|
||||
import iconv from 'iconv-lite';
|
||||
//@ts-ignore
|
||||
import childProcess from "child_process";
|
||||
import { safePromise } from "./util.promise.js";
|
||||
import { ILogger, logger } from "./util.log.js";
|
||||
//@ts-ignore
|
||||
import iconv from "iconv-lite";
|
||||
export type ExecOption = {
|
||||
cmd: string | string[];
|
||||
env: any;
|
||||
@@ -11,12 +13,12 @@ export type ExecOption = {
|
||||
};
|
||||
|
||||
async function exec(opts: ExecOption): Promise<string> {
|
||||
let cmd = '';
|
||||
let cmd = "";
|
||||
const log = opts.logger || logger;
|
||||
if (opts.cmd instanceof Array) {
|
||||
for (const item of opts.cmd) {
|
||||
if (cmd) {
|
||||
cmd += ' && ' + item;
|
||||
cmd += " && " + item;
|
||||
} else {
|
||||
cmd = item;
|
||||
}
|
||||
@@ -28,17 +30,18 @@ async function exec(opts: ExecOption): Promise<string> {
|
||||
cmd,
|
||||
{
|
||||
env: {
|
||||
//@ts-ignore
|
||||
...process.env,
|
||||
...opts.env,
|
||||
},
|
||||
...opts.options,
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
(error: any, stdout: { toString: (arg0: string) => any }, stderr: any) => {
|
||||
if (error) {
|
||||
log.error(`exec error: ${error}`);
|
||||
reject(error);
|
||||
} else {
|
||||
const res = stdout.toString('utf-8');
|
||||
const res = stdout.toString("utf-8");
|
||||
log.info(`stdout: ${res}`);
|
||||
resolve(res);
|
||||
}
|
||||
@@ -57,11 +60,12 @@ export type SpawnOption = {
|
||||
};
|
||||
|
||||
function isWindows() {
|
||||
return process.platform === 'win32';
|
||||
// @ts-ignore
|
||||
return process.platform === "win32";
|
||||
}
|
||||
function convert(buffer: any) {
|
||||
if (isWindows()) {
|
||||
const decoded = iconv.decode(buffer, 'GBK');
|
||||
const decoded = iconv.decode(buffer, "GBK");
|
||||
// 检查是否有有效字符
|
||||
return decoded && decoded.trim().length > 0 ? decoded : buffer.toString();
|
||||
} else {
|
||||
@@ -74,12 +78,12 @@ function convert(buffer: any) {
|
||||
// }
|
||||
|
||||
async function spawn(opts: SpawnOption): Promise<string> {
|
||||
let cmd = '';
|
||||
let cmd = "";
|
||||
const log = opts.logger || logger;
|
||||
if (opts.cmd instanceof Array) {
|
||||
for (const item of opts.cmd) {
|
||||
if (cmd) {
|
||||
cmd += ' && ' + item;
|
||||
cmd += " && " + item;
|
||||
} else {
|
||||
cmd = item;
|
||||
}
|
||||
@@ -88,37 +92,47 @@ async function spawn(opts: SpawnOption): Promise<string> {
|
||||
cmd = opts.cmd;
|
||||
}
|
||||
log.info(`执行命令: ${cmd}`);
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
return safePromise((resolve, reject) => {
|
||||
const ls = childProcess.spawn(cmd, {
|
||||
shell: true,
|
||||
env: {
|
||||
//@ts-ignore
|
||||
...process.env,
|
||||
...opts.env,
|
||||
},
|
||||
...opts.options,
|
||||
});
|
||||
ls.stdout.on('data', data => {
|
||||
ls.stdout.on("data", (data: string) => {
|
||||
data = convert(data);
|
||||
log.info(`stdout: ${data}`);
|
||||
stdout += data;
|
||||
});
|
||||
|
||||
ls.stderr.on('data', data => {
|
||||
ls.stderr.on("data", (data: string) => {
|
||||
data = convert(data);
|
||||
log.warn(`stderr: ${data}`);
|
||||
stderr += data;
|
||||
});
|
||||
ls.on('error', error => {
|
||||
ls.on("error", (error: any) => {
|
||||
log.error(`child process error: ${error}`);
|
||||
//@ts-ignore
|
||||
error.stderr = stderr;
|
||||
//@ts-ignore
|
||||
error.stdout = stdout;
|
||||
reject(error);
|
||||
});
|
||||
|
||||
ls.on('close', (code: number) => {
|
||||
ls.on("close", (code: number) => {
|
||||
if (code !== 0) {
|
||||
log.error(`child process exited with code ${code}`);
|
||||
reject(new Error(stderr));
|
||||
const e = new Error(stderr || "return " + code);
|
||||
//@ts-ignore
|
||||
e.stderr = stderr;
|
||||
//@ts-ignore
|
||||
e.stdout = stdout;
|
||||
reject(e);
|
||||
} else {
|
||||
resolve(stdout);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -14,11 +14,12 @@
|
||||
"build3": "rollup -c",
|
||||
"preview": "vite preview",
|
||||
"test": "mocha --loader=ts-node/esm",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/plus-core": "^1.37.0",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@certd/plus-core": "^1.37.3",
|
||||
"dayjs": "^1.11.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"reflect-metadata": "^0.1.13"
|
||||
@@ -44,5 +45,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
@@ -24,5 +24,5 @@
|
||||
"prettier": "^2.8.8",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
@@ -61,5 +61,5 @@
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -17,7 +17,7 @@
|
||||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -32,5 +32,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -17,7 +17,8 @@
|
||||
"lint": "mwts check",
|
||||
"lint:fix": "mwts fix",
|
||||
"prepublish": "npm run build",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "greper",
|
||||
@@ -27,11 +28,11 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.37.0",
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/pipeline": "^1.37.0",
|
||||
"@certd/plugin-lib": "^1.37.0",
|
||||
"@certd/plus-core": "^1.37.0",
|
||||
"@certd/acme-client": "^1.37.3",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@certd/pipeline": "^1.37.3",
|
||||
"@certd/plugin-lib": "^1.37.3",
|
||||
"@certd/plus-core": "^1.37.3",
|
||||
"@midwayjs/cache": "3.14.0",
|
||||
"@midwayjs/core": "3.20.11",
|
||||
"@midwayjs/i18n": "3.20.13",
|
||||
@@ -63,5 +64,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -47,4 +47,12 @@ export abstract class BaseController {
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
isAdmin() {
|
||||
const roleIds: number[] = this.ctx?.user?.roles;
|
||||
if (roleIds?.includes(1)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { AppKey, PlusRequestService } from '@certd/plus-core';
|
||||
import { cache, http, HttpRequestConfig, logger } from '@certd/basic';
|
||||
import { SysInstallInfo, SysLicenseInfo, SysSettingsService } from '../../settings/index.js';
|
||||
import { merge } from 'lodash-es';
|
||||
|
||||
import fs from 'fs';
|
||||
@Provide("plusService")
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
export class PlusService {
|
||||
@@ -85,12 +85,31 @@ export class PlusService {
|
||||
|
||||
async sendEmail(email: any) {
|
||||
const plusRequestService = await this.getPlusRequestService();
|
||||
|
||||
let attachments = email.attachments || [];
|
||||
if (attachments.length > 0) {
|
||||
const newAttachments: any[] = [];
|
||||
attachments.forEach((item: any) => {
|
||||
const name = item.filename || item.path.split('/').pop();
|
||||
const body = item.content || fs.readFileSync(item.path);
|
||||
const bodyBase64 = Buffer.from(body).toString('base64');
|
||||
item = {
|
||||
name,
|
||||
body: bodyBase64,
|
||||
};
|
||||
newAttachments.push(item);
|
||||
});
|
||||
attachments = newAttachments;
|
||||
}
|
||||
|
||||
await plusRequestService.request({
|
||||
url: '/activation/emailSend',
|
||||
data: {
|
||||
subject: email.subject,
|
||||
text: email.content,
|
||||
to: email.receivers,
|
||||
text: email.content,
|
||||
html: email.html,
|
||||
attachments,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -37,6 +37,15 @@ export class SysPublicSettings extends BaseSettings {
|
||||
//验证码类型
|
||||
captchaType?: string;
|
||||
captchaAddonId?:number;
|
||||
|
||||
|
||||
|
||||
//流水线是否启用有效期
|
||||
pipelineValidTimeEnabled?: boolean = false;
|
||||
|
||||
//证书域名添加到监控
|
||||
certDomainAddToMonitorEnabled?: boolean = false;
|
||||
|
||||
}
|
||||
|
||||
export class SysPrivateSettings extends BaseSettings {
|
||||
@@ -51,6 +60,8 @@ export class SysPrivateSettings extends BaseSettings {
|
||||
dnsResultOrder? = '';
|
||||
commonCnameEnabled?: boolean = true;
|
||||
|
||||
httpRequestTimeout?: number = 30;
|
||||
|
||||
sms?: {
|
||||
type?: string;
|
||||
config?: any;
|
||||
@@ -214,3 +225,4 @@ export class SysSafeSetting extends BaseSettings {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -3,6 +3,25 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复并发情况下证书申请日志混乱的bug ([bb2714f](https://github.com/certd/certd/commit/bb2714ff241f9db4a71d805b23a1b0f9f2f6413a))
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f))
|
||||
* 支持新网代理方式 ([f612509](https://github.com/certd/certd/commit/f612509cac87b859e81a7a52fe94b2eaccad22f9))
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* cname主域名校验提示优化,显示不一致的两方便于排查问题 ([6ebb365](https://github.com/certd/certd/commit/6ebb3659f42155e4e8da600c493fb5227cd08137))
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -13,13 +13,14 @@
|
||||
"build3": "rollup -c",
|
||||
"build2": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.37.0",
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/pipeline": "^1.37.0",
|
||||
"@certd/plugin-lib": "^1.37.0",
|
||||
"@certd/acme-client": "^1.37.3",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@certd/pipeline": "^1.37.3",
|
||||
"@certd/plugin-lib": "^1.37.3",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -31,7 +32,6 @@
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/psl": "^1.1.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"chai": "^4.3.6",
|
||||
@@ -43,5 +43,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ export class AcmeService {
|
||||
this.sslProvider = options.sslProvider || "letsencrypt";
|
||||
this.eab = options.eab;
|
||||
this.skipLocalVerify = options.skipLocalVerify ?? false;
|
||||
acme.setLogger((message: any, ...args: any[]) => {
|
||||
this.logger.info(message, ...args);
|
||||
});
|
||||
// acme.setLogger((message: any, ...args: any[]) => {
|
||||
// this.logger.info(message, ...args);
|
||||
// });
|
||||
}
|
||||
|
||||
async getAccountConfig(email: string, urlMapping: UrlMapping): Promise<any> {
|
||||
@@ -155,6 +155,7 @@ export class AcmeService {
|
||||
backoffMax: 10000,
|
||||
urlMapping,
|
||||
signal: this.options.signal,
|
||||
logger: this.logger,
|
||||
});
|
||||
|
||||
if (conf.accountUrl == null) {
|
||||
|
||||
@@ -117,11 +117,11 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
helper: `1. <b>DNS直接验证</b>:域名dns解析是在阿里云/腾讯云/华为云/CF/NameSilo/西数/火山/dns.la/京东云/51dns的,选它
|
||||
2. <b>CNAME代理验证</b>:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证)
|
||||
helper: `1. <b>DNS直接验证</b>:当域名dns解析已被本系统支持时(即下方DNS解析服务商选项中可选),推荐选择此方式
|
||||
2. <b>CNAME代理验证</b>:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(如果经常申请失败,建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证)
|
||||
3. <b>HTTP文件验证</b>:不支持泛域名,需要配置网站文件上传
|
||||
4. <b>多DNS提供商</b>:每个域名可以选择独立的DNS提供商
|
||||
5. <b>自动匹配</b>:需要在[域名管理](#/certd/cert/domain)中事先配置好校验方式
|
||||
5. <b>自动匹配</b>:此处无需选择校验方式,需要在[域名管理](#/certd/cert/domain)中提前配置好校验方式
|
||||
`,
|
||||
})
|
||||
challengeType!: string;
|
||||
@@ -133,9 +133,9 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
||||
name: "icon-select",
|
||||
vModel: "value",
|
||||
options: [
|
||||
{ value: "letsencrypt", label: "Let's Encrypt", icon: "simple-icons:letsencrypt" },
|
||||
{ value: "google", label: "Google", icon: "flat-color-icons:google" },
|
||||
{ value: "zerossl", label: "ZeroSSL", icon: "emojione:digit-zero" },
|
||||
{ value: "letsencrypt", label: "Let's Encrypt(免费,新手推荐)", icon: "simple-icons:letsencrypt" },
|
||||
{ value: "google", label: "Google(免费)", icon: "flat-color-icons:google" },
|
||||
{ value: "zerossl", label: "ZeroSSL(免费)", icon: "emojione:digit-zero" },
|
||||
{ value: "sslcom", label: "SSL.com(仅主域名和www免费)", icon: "la:expeditedssl" },
|
||||
],
|
||||
},
|
||||
@@ -635,8 +635,8 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
||||
}
|
||||
|
||||
// 主域名异常
|
||||
if (cnameRecord.mainDomain !== mainDomain) {
|
||||
throw new Error(`CNAME记录${domain}的域名与配置的主域名不一致,请确认是否在流水线创建之后修改了子域名托管,您需要重新校验CNAME记录的校验状态`);
|
||||
if (cnameRecord.mainDomain && mainDomain && cnameRecord.mainDomain !== mainDomain) {
|
||||
throw new Error(`CNAME记录${domain}的域名与配置的主域名不一致(${cnameRecord.mainDomain}≠${mainDomain}),请确认是否在流水线创建之后修改了子域名托管,您需要重新校验CNAME记录的校验状态`);
|
||||
}
|
||||
|
||||
let dnsProvider = cnameRecord.commonDnsProvider;
|
||||
|
||||
@@ -3,6 +3,22 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* ssh 增加禁止-i参数提示 ([3a8931f](https://github.com/certd/certd/commit/3a8931feeffd7157163ff7d46b693e5e1a434b9c))
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* dns解析支持阿里esa ([9291fa6](https://github.com/certd/certd/commit/9291fa68aa7a88a05c2f888bf3048df36a8fbde3))
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -13,7 +13,8 @@
|
||||
"build3": "rollup -c",
|
||||
"build2": "vue-tsc --noEmit && vite build",
|
||||
"preview": "vite preview",
|
||||
"pub": "npm publish"
|
||||
"pub": "npm publish",
|
||||
"compile": "tsc --skipLibCheck --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/openapi-client": "^0.4.14",
|
||||
@@ -21,8 +22,8 @@
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-s3": "^3.787.0",
|
||||
"@certd/basic": "^1.37.0",
|
||||
"@certd/pipeline": "^1.37.0",
|
||||
"@certd/basic": "^1.37.3",
|
||||
"@certd/pipeline": "^1.37.3",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.22.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
@@ -41,7 +42,6 @@
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/psl": "^1.1.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"chai": "^4.3.6",
|
||||
@@ -53,5 +53,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "6b43007c44e1b8ccdb87081b0cf3f99fc2c09d53"
|
||||
"gitHead": "e1daaf07ce2fda6ce44998d65f8a989fc6af88db"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import { AccessInput, BaseAccess, IsAccess } from "@certd/pipeline";
|
||||
|
||||
@IsAccess({
|
||||
name: "aliesa",
|
||||
title: "阿里云ESA授权",
|
||||
desc: "",
|
||||
icon: "ant-design:aliyun-outlined",
|
||||
order: 0,
|
||||
})
|
||||
export class AliesaAccess extends BaseAccess {
|
||||
@AccessInput({
|
||||
title: "阿里云授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
vModel: "modelValue",
|
||||
type: "aliyun",
|
||||
},
|
||||
helper: "请选择阿里云授权",
|
||||
required: true,
|
||||
})
|
||||
accessId = "";
|
||||
|
||||
@AccessInput({
|
||||
title: "地区",
|
||||
component: {
|
||||
name: "a-select",
|
||||
vModel: "value",
|
||||
options: [
|
||||
{
|
||||
label: "杭州",
|
||||
value: "cn-hangzhou",
|
||||
},
|
||||
{
|
||||
label: "新加坡",
|
||||
value: "ap-southeast-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
helper: "请选择ESA地区",
|
||||
required: true,
|
||||
})
|
||||
region = "";
|
||||
}
|
||||
|
||||
new AliesaAccess();
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from "./aliyun-access.js";
|
||||
export * from "./alioss-access.js";
|
||||
export * from "./aliesa-access.js";
|
||||
|
||||
@@ -7,4 +7,4 @@ export * from "./qiniu/index.js";
|
||||
export * from "./ctyun/index.js";
|
||||
export * from "./oss/index.js";
|
||||
export * from "./s3/index.js";
|
||||
export * from "./lib/index.js";
|
||||
export * from "./lib/index.js";
|
||||
@@ -188,6 +188,11 @@ export class AsyncSsh2Client {
|
||||
// script += "\r\nexit\r\n";
|
||||
// //保证windows下正常退出
|
||||
// }
|
||||
|
||||
if (script.includes(" -i ")) {
|
||||
this.logger.warn("不支持交互式命令,请不要使用-i参数");
|
||||
}
|
||||
|
||||
return safePromise((resolve, reject) => {
|
||||
this.logger.info(`执行命令:[${this.connConf.host}][exec]: \n` + script);
|
||||
// pty 伪终端,window下的输出会带上conhost.exe之类的多余的字符串,影响返回结果判断
|
||||
|
||||
2
packages/ui/certd-client/.env.remote
Normal file
2
packages/ui/certd-client/.env.remote
Normal file
@@ -0,0 +1,2 @@
|
||||
#登录与权限开启
|
||||
VITE_APP_PM_ENABLED=false
|
||||
@@ -3,6 +3,29 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.37.3](https://github.com/certd/certd/compare/v1.37.2...v1.37.3) (2025-10-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 注册页面增加手机注册tab页签 ([6b2f1fc](https://github.com/certd/certd/commit/6b2f1fcd3e058061b814c3331cda8ce1b2d80d73))
|
||||
* 流水线创建时支持添加到证书监控 ([59ba408](https://github.com/certd/certd/commit/59ba4080706548828ef1c0a9cd893c1c9a7d591f))
|
||||
* 流水线支持有效期设置 ([911e69e](https://github.com/certd/certd/commit/911e69e3bc0cdd48b62953b5d0981d640fc1f8ac))
|
||||
* 站点证书监控增加导出和分组功能 ([2ed12c4](https://github.com/certd/certd/commit/2ed12c429eb58274a4f9dd0ed3b66e160d283ded))
|
||||
* 证书监控增加批量删除 ([e578c52](https://github.com/certd/certd/commit/e578c52fdf2f838038062aa4209b655fbae461fb))
|
||||
|
||||
## [1.37.2](https://github.com/certd/certd/compare/v1.37.1...v1.37.2) (2025-10-14)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 证书监控支持设置证书即将过期天数 ([cd35568](https://github.com/certd/certd/commit/cd35568e042e6ab928685efad51cdbed823d2d4f))
|
||||
* 支持网络测试 ([2bef608](https://github.com/certd/certd/commit/2bef608e07ceb56d52007f290667e0afef401b22))
|
||||
|
||||
## [1.37.1](https://github.com/certd/certd/compare/v1.37.0...v1.37.1) (2025-09-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复版本比较bug ([109696e](https://github.com/certd/certd/commit/109696e965d68c50c8627ffd40203edd1d2daea5))
|
||||
|
||||
# [1.37.0](https://github.com/certd/certd/compare/v1.36.25...v1.37.0) (2025-09-28)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.37.0",
|
||||
"version": "1.37.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
"dev:pm": "vite --mode pm",
|
||||
"dev:force": "vite --force",
|
||||
"remote": "vite --mode remote --open",
|
||||
"debug": "vite --mode debug --open",
|
||||
"debug:pm": "vite --mode debugpm",
|
||||
"debug:force": "vite --force --mode debug",
|
||||
@@ -105,8 +106,8 @@
|
||||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.37.0",
|
||||
"@certd/pipeline": "^1.37.0",
|
||||
"@certd/lib-iframe": "^1.37.3",
|
||||
"@certd/pipeline": "^1.37.3",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -57,6 +57,7 @@ export default {
|
||||
suiteBuy: "Suite Purchase",
|
||||
myTrade: "My Orders",
|
||||
paymentReturn: "Payment Return",
|
||||
hasExpired: "Expired",
|
||||
user: {
|
||||
greeting: "Hello",
|
||||
profile: "Account Info",
|
||||
@@ -136,10 +137,16 @@ export default {
|
||||
triggerType: "Trigger Type",
|
||||
pipelineId: "Pipeline Id",
|
||||
},
|
||||
|
||||
pi: {
|
||||
validTime: "Piepline Valid Time",
|
||||
validTimeHelper: "Not filled in means permanent validity",
|
||||
},
|
||||
types: {
|
||||
certApply: "Certificate Application",
|
||||
certUpload: "Certificate Upload",
|
||||
certApply: "Cert Apply",
|
||||
certUpload: "Cert Upload",
|
||||
custom: "Custom",
|
||||
template: "Template",
|
||||
},
|
||||
myPipelines: "My Pipelines",
|
||||
selectedCount: "Selected {count} items",
|
||||
@@ -175,6 +182,7 @@ export default {
|
||||
suiteSetting: "Suite Settings",
|
||||
orderManager: "Order Management",
|
||||
userSuites: "User Suites",
|
||||
netTest: "Network Test",
|
||||
},
|
||||
certificateRepo: {
|
||||
title: "Certificate Repository",
|
||||
@@ -223,9 +231,13 @@ export default {
|
||||
notificationWhen: "Notification Timing",
|
||||
notificationHelper: "Get real-time alerts when the task fails",
|
||||
groupIdTitle: "Pipeline Group",
|
||||
|
||||
addToMonitorEnabled: "Add to Cert Monitor",
|
||||
addToMonitorDomains: "Add to Monitor Domains",
|
||||
},
|
||||
notificationDefault: "Use Default Notification",
|
||||
monitor: {
|
||||
remark: "Remark",
|
||||
title: "Site Certificate Monitoring",
|
||||
description: "Check website certificates' expiration at 0:00 daily; reminders sent 10 days before expiration (using default notification channel);",
|
||||
settingLink: "Site Monitoring Settings",
|
||||
@@ -247,6 +259,7 @@ export default {
|
||||
certDomains: "Certificate Domains",
|
||||
certProvider: "Issuer",
|
||||
certStatus: "Certificate Status",
|
||||
error: "Error",
|
||||
status: {
|
||||
ok: "Valid",
|
||||
expired: "Expired",
|
||||
@@ -280,6 +293,8 @@ export default {
|
||||
cronTrigger: "Scheduled trigger for monitoring",
|
||||
dnsServer: "DNS Server",
|
||||
dnsServerHelper: "Use a custom domain name resolution server, such as: 1.1.1.1 , support multiple",
|
||||
certValidDays: "Certificate Valid Days",
|
||||
certValidDaysHelper: "Number of days before expiration to send a notification",
|
||||
},
|
||||
},
|
||||
checkStatus: {
|
||||
@@ -289,7 +304,7 @@ export default {
|
||||
},
|
||||
domainList: {
|
||||
title: "Domain List",
|
||||
helper: "Format: domain:port:name, one per line. Port and name are optional.\nExamples:\nwww.baidu.com:443:Baidu\nwww.taobao.com::Taobao\nwww.google.com",
|
||||
helper: "Format: domain:port:name:remark, one per line. Port and name are optional.\nExamples:\nwww.baidu.com:443:Baidu:remarkText\nwww.taobao.com::Taobao\nwww.google.com",
|
||||
required: "Please enter domains to import",
|
||||
placeholder: "www.baidu.com:443:Baidu\nwww.taobao.com::Taobao\nwww.google.com\n",
|
||||
},
|
||||
@@ -447,6 +462,7 @@ export default {
|
||||
description: "Description",
|
||||
createTime: "Creation Time",
|
||||
updateTime: "Update Time",
|
||||
mainDomain: "Main Domain",
|
||||
edit: "Edit",
|
||||
groupName: "Group Name",
|
||||
enterGroupName: "Please enter group name",
|
||||
@@ -715,8 +731,18 @@ export default {
|
||||
addonName: "Name",
|
||||
addonNameHelper: "Fill freely, helps to distinguish when multiple same type exist",
|
||||
addonTypeSelect: "Select type",
|
||||
dates: {
|
||||
years: "{count} years",
|
||||
months: "{count} months",
|
||||
},
|
||||
sys: {
|
||||
setting: {
|
||||
baseSetting: "Base Settings",
|
||||
registerSetting: "Register Settings",
|
||||
safeSetting: "Safe Settings",
|
||||
paymentSetting: "Payment Settings",
|
||||
captchaSetting: "Captcha Setting",
|
||||
pipelineSetting: "Pipeline Settings",
|
||||
showRunStrategy: "Show RunStrategy",
|
||||
showRunStrategyHelper: "Allow modify the run strategy of the task",
|
||||
|
||||
@@ -726,11 +752,11 @@ export default {
|
||||
captchaTest: "Captcha Test",
|
||||
// 保存后再点击测试,请务必测试通过了,再开启登录验证码
|
||||
captchaTestHelper: "Save and click test, please make sure the test is passed before enabling login captcha",
|
||||
baseSetting: "Base Settings",
|
||||
registerSetting: "Register Settings",
|
||||
safeSetting: "Safe Settings",
|
||||
paymentSetting: "Payment Settings",
|
||||
captchaSetting: "Captcha Setting",
|
||||
|
||||
pipelineValidTimeEnabled: "Enable Pipeline Valid Time",
|
||||
pipelineValidTimeEnabledHelper: "Whether to enable the valid time of the pipeline",
|
||||
certDomainAddToMonitorEnabled: "Add Domain to Certificate Monitor",
|
||||
certDomainAddToMonitorEnabledHelper: "Whether to add the domain to the certificate monitor",
|
||||
},
|
||||
},
|
||||
modal: {
|
||||
|
||||
@@ -62,6 +62,7 @@ export default {
|
||||
suiteBuy: "套餐购买",
|
||||
myTrade: "我的订单",
|
||||
paymentReturn: "支付返回",
|
||||
hasExpired: "已过期",
|
||||
|
||||
user: {
|
||||
greeting: "您好",
|
||||
@@ -142,10 +143,15 @@ export default {
|
||||
triggerType: "触发类型",
|
||||
pipelineId: "流水线Id",
|
||||
},
|
||||
pi: {
|
||||
validTime: "流水线有效期",
|
||||
validTimeHelper: "不填则为永久有效",
|
||||
},
|
||||
types: {
|
||||
certApply: "证书申请",
|
||||
certUpload: "证书上传",
|
||||
custom: "自定义",
|
||||
template: "模版",
|
||||
},
|
||||
myPipelines: "我的流水线",
|
||||
selectedCount: "已选择 {count} 项",
|
||||
@@ -181,6 +187,7 @@ export default {
|
||||
suiteSetting: "套餐设置",
|
||||
orderManager: "订单管理",
|
||||
userSuites: "用户套餐",
|
||||
netTest: "网络测试",
|
||||
},
|
||||
certificateRepo: {
|
||||
title: "证书仓库",
|
||||
@@ -228,9 +235,12 @@ export default {
|
||||
notificationWhen: "通知时机",
|
||||
notificationHelper: "任务执行失败实时提醒",
|
||||
groupIdTitle: "流水线分组",
|
||||
addToMonitorEnabled: "添加到证书监控",
|
||||
addToMonitorDomains: "添加到监控域名",
|
||||
},
|
||||
notificationDefault: "使用默认通知",
|
||||
monitor: {
|
||||
remark: "备注",
|
||||
title: "站点证书监控",
|
||||
description: "每天0点,检查网站证书的过期时间,到期前10天时将发出提醒(使用默认通知渠道);",
|
||||
settingLink: "站点监控设置",
|
||||
@@ -252,6 +262,7 @@ export default {
|
||||
certDomains: "证书域名",
|
||||
certProvider: "颁发机构",
|
||||
certStatus: "证书状态",
|
||||
error: "错误信息",
|
||||
status: {
|
||||
ok: "正常",
|
||||
expired: "过期",
|
||||
@@ -285,6 +296,8 @@ export default {
|
||||
cronTrigger: "定时触发监控",
|
||||
dnsServer: "DNS服务器",
|
||||
dnsServerHelper: "使用自定义的域名解析服务器,如:1.1.1.1 , 支持多个",
|
||||
certValidDays: "证书到期前天数",
|
||||
certValidDaysHelper: "证书到期前多少天发送通知",
|
||||
},
|
||||
},
|
||||
checkStatus: {
|
||||
@@ -294,9 +307,9 @@ export default {
|
||||
},
|
||||
domainList: {
|
||||
title: "域名列表",
|
||||
helper: "格式【域名:端口:名称】,一行一个,其中端口、名称可以省略\n比如:\nwww.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com",
|
||||
helper: "格式【域名:端口:名称:备注】,一行一个,其中端口、名称、备注可以省略\n比如:\nwww.baidu.com:443:百度:备注文本\nwww.taobao.com::淘宝\nwww.google.com",
|
||||
required: "请输入要导入的域名",
|
||||
placeholder: "www.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com\n",
|
||||
placeholder: "www.baidu.com:443:百度:备注文本\nwww.taobao.com::淘宝\nwww.google.com\n",
|
||||
},
|
||||
accountInfo: "账号信息",
|
||||
securitySettings: "认证安全设置",
|
||||
@@ -453,6 +466,7 @@ export default {
|
||||
description: "说明",
|
||||
createTime: "创建时间",
|
||||
updateTime: "更新时间",
|
||||
mainDomain: "主域名",
|
||||
edit: "编辑",
|
||||
groupName: "分组名称",
|
||||
enterGroupName: "请输入分组名称",
|
||||
@@ -717,8 +731,19 @@ export default {
|
||||
copyPipelineConfig: "复制该流水线配置作为模板来源",
|
||||
pipeline: "流水线",
|
||||
},
|
||||
dates: {
|
||||
years: "{count}年",
|
||||
months: "{count}月",
|
||||
},
|
||||
sys: {
|
||||
setting: {
|
||||
baseSetting: "基本设置",
|
||||
registerSetting: "注册设置",
|
||||
safeSetting: "安全设置",
|
||||
paymentSetting: "支付设置",
|
||||
captchaSetting: "验证码设置",
|
||||
pipelineSetting: "流水线设置",
|
||||
|
||||
showRunStrategy: "显示运行策略选择",
|
||||
showRunStrategyHelper: "任务设置中是否允许选择运行策略",
|
||||
|
||||
@@ -727,11 +752,11 @@ export default {
|
||||
captchaType: "验证码配置",
|
||||
captchaTest: "测试验证码",
|
||||
captchaTestHelper: "保存后再点击测试,请务必测试通过了,再开启登录验证码",
|
||||
baseSetting: "基本设置",
|
||||
registerSetting: "注册设置",
|
||||
safeSetting: "安全设置",
|
||||
paymentSetting: "支付设置",
|
||||
captchaSetting: "验证码设置",
|
||||
|
||||
pipelineValidTimeEnabled: "启用流水线有效期",
|
||||
pipelineValidTimeEnabledHelper: "是否启用流水线有效期",
|
||||
certDomainAddToMonitorEnabled: "证书域名添加到证书监控",
|
||||
certDomainAddToMonitorEnabledHelper: "创建证书流水线时是否可以选择将域名添加到证书监控",
|
||||
},
|
||||
},
|
||||
modal: {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { usePreferences } from "/@/vben/preferences";
|
||||
import { LocalStorage } from "/@/utils/util.storage";
|
||||
|
||||
import { FsEditorCode } from "@fast-crud/editor-code";
|
||||
import "@fast-crud/editor-code/dist/style.css"
|
||||
import "@fast-crud/editor-code/dist/style.css";
|
||||
|
||||
class ColumnSizeSaver {
|
||||
save: (key: string, size: number) => void;
|
||||
|
||||
@@ -249,6 +249,17 @@ export const sysResources = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "certd.sysResources.netTest",
|
||||
name: "NetTest",
|
||||
path: "/sys/nettest",
|
||||
component: "/sys/nettest/index.vue",
|
||||
meta: {
|
||||
icon: "ion:build-outline",
|
||||
auth: true,
|
||||
keepAlive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -50,6 +50,12 @@ export type SysPublicSetting = {
|
||||
captchaEnabled?: boolean;
|
||||
captchaType?: number;
|
||||
captchaAddonId?: number;
|
||||
|
||||
//流水线是否启用有效期
|
||||
pipelineValidTimeEnabled?: boolean;
|
||||
|
||||
//证书域名添加到监控
|
||||
certDomainAddToMonitorEnabled?: boolean;
|
||||
};
|
||||
export type SuiteSetting = {
|
||||
enabled?: boolean;
|
||||
@@ -63,6 +69,9 @@ export type SysPrivateSetting = {
|
||||
type?: string;
|
||||
config?: any;
|
||||
};
|
||||
|
||||
//http请求超时时间
|
||||
httpRequestTimeout?: number;
|
||||
};
|
||||
export type SysInstallInfo = {
|
||||
siteId: string;
|
||||
|
||||
@@ -19,6 +19,10 @@ div#app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
pre.pre{
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
width: 12px !important;
|
||||
height: 12px !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
width: 8px;
|
||||
width: 12px !important;
|
||||
background: rgba(#101f1c, 0.1);
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
-webkit-border-radius: 4em;
|
||||
-moz-border-radius: 4em;
|
||||
border-radius: 4em;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
// background-color: rgba(#101F1C, 0.5);
|
||||
background-clip: padding-box;
|
||||
min-height: 28px;
|
||||
-webkit-border-radius: 2em;
|
||||
-moz-border-radius: 2em;
|
||||
border-radius: 2em;
|
||||
-webkit-border-radius: 4em;
|
||||
-moz-border-radius: 4em;
|
||||
border-radius: 4em;
|
||||
background-color: #b3b3b3;
|
||||
box-shadow: 0px 1px 1px #eee inset;
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>(
|
||||
);
|
||||
},
|
||||
{
|
||||
inheritAttrs: false,
|
||||
name: "VbenParentModal",
|
||||
inheritAttrs: false,
|
||||
}
|
||||
);
|
||||
return [Modal, extendedApi as ExtendedModalApi] as const;
|
||||
@@ -104,8 +104,8 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>(
|
||||
);
|
||||
},
|
||||
{
|
||||
inheritAttrs: false,
|
||||
name: "VbenModal",
|
||||
inheritAttrs: false,
|
||||
}
|
||||
);
|
||||
injectData.extendApi?.(extendedApi);
|
||||
|
||||
64
packages/ui/certd-client/src/views/certd/basic/group/api.ts
Normal file
64
packages/ui/certd-client/src/views/certd/basic/group/api.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import { dict } from "@fast-crud/fast-crud";
|
||||
import { request } from "/src/api/service";
|
||||
|
||||
export function createApi() {
|
||||
const apiPrefix = "/basic/group";
|
||||
return {
|
||||
async GetList(query: any) {
|
||||
return await request({
|
||||
url: apiPrefix + "/page",
|
||||
method: "post",
|
||||
data: query,
|
||||
});
|
||||
},
|
||||
|
||||
async AddObj(obj: any) {
|
||||
return await request({
|
||||
url: apiPrefix + "/add",
|
||||
method: "post",
|
||||
data: obj,
|
||||
});
|
||||
},
|
||||
|
||||
async UpdateObj(obj: any) {
|
||||
return await request({
|
||||
url: apiPrefix + "/update",
|
||||
method: "post",
|
||||
data: obj,
|
||||
});
|
||||
},
|
||||
|
||||
async DelObj(id: number) {
|
||||
return await request({
|
||||
url: apiPrefix + "/delete",
|
||||
method: "post",
|
||||
params: { id },
|
||||
});
|
||||
},
|
||||
|
||||
async GetObj(id: number) {
|
||||
return await request({
|
||||
url: apiPrefix + "/info",
|
||||
method: "post",
|
||||
params: { id },
|
||||
});
|
||||
},
|
||||
async ListAll(type: string) {
|
||||
return await request({
|
||||
url: apiPrefix + "/all",
|
||||
method: "post",
|
||||
params: { type },
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const pipelineGroupApi = createApi();
|
||||
|
||||
export function createGroupDictRef(type: string) {
|
||||
return dict({
|
||||
url: "/basic/group/all?type=" + type,
|
||||
value: "id",
|
||||
label: "name",
|
||||
});
|
||||
}
|
||||
142
packages/ui/certd-client/src/views/certd/basic/group/crud.tsx
Normal file
142
packages/ui/certd-client/src/views/certd/basic/group/crud.tsx
Normal file
@@ -0,0 +1,142 @@
|
||||
import { useI18n } from "/src/locales";
|
||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { pipelineGroupApi } from "./api";
|
||||
import { ref } from "vue";
|
||||
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const { t } = useI18n();
|
||||
const api = pipelineGroupApi;
|
||||
const typeRef = ref(context.type);
|
||||
|
||||
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||
return await api.GetList(query);
|
||||
};
|
||||
const editRequest = async (req: EditReq) => {
|
||||
const { form, row } = req;
|
||||
form.id = row.id;
|
||||
const res = await api.UpdateObj(form);
|
||||
return res;
|
||||
};
|
||||
const delRequest = async (req: DelReq) => {
|
||||
const { row } = req;
|
||||
return await api.DelObj(row.id);
|
||||
};
|
||||
|
||||
const addRequest = async (req: AddReq) => {
|
||||
const { form } = req;
|
||||
form.type = typeRef.value;
|
||||
const res = await api.AddObj(form);
|
||||
return res;
|
||||
};
|
||||
|
||||
return {
|
||||
crudOptions: {
|
||||
settings: {
|
||||
plugins: {
|
||||
mobile: {
|
||||
props: {
|
||||
rowHandle: {
|
||||
width: 160,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
request: {
|
||||
pageRequest,
|
||||
addRequest,
|
||||
editRequest,
|
||||
delRequest,
|
||||
},
|
||||
search: {
|
||||
initialForm: {
|
||||
type: typeRef.value,
|
||||
},
|
||||
},
|
||||
form: {
|
||||
labelCol: {
|
||||
//固定label宽度
|
||||
span: null,
|
||||
style: {
|
||||
width: "100px",
|
||||
},
|
||||
},
|
||||
col: {
|
||||
span: 22,
|
||||
},
|
||||
wrapper: {
|
||||
width: 600,
|
||||
},
|
||||
},
|
||||
rowHandle: {
|
||||
width: 200,
|
||||
group: {
|
||||
editable: {
|
||||
edit: {
|
||||
text: t("certd.edit"),
|
||||
order: -1,
|
||||
type: "primary",
|
||||
click({ row, index }) {
|
||||
crudExpose.openEdit({
|
||||
index,
|
||||
row,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
table: {
|
||||
editable: {
|
||||
enabled: true,
|
||||
mode: "cell",
|
||||
exclusive: true,
|
||||
//排他式激活效果,将其他行的编辑状态触发保存
|
||||
exclusiveEffect: "save", //自动保存其他行编辑状态,cancel = 自动关闭其他行编辑状态
|
||||
async updateCell(opts) {
|
||||
const { row, key, value } = opts;
|
||||
//如果是添加,需要返回{[rowKey]:xxx},比如:{id:2}
|
||||
return await api.UpdateObj({ id: row.id, [key]: value });
|
||||
},
|
||||
},
|
||||
},
|
||||
columns: {
|
||||
id: {
|
||||
title: "ID",
|
||||
key: "id",
|
||||
type: "number",
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
column: {
|
||||
width: 100,
|
||||
editable: {
|
||||
disabled: true,
|
||||
},
|
||||
},
|
||||
form: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
name: {
|
||||
title: t("certd.groupName"),
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
type: "text",
|
||||
form: {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: t("certd.enterGroupName"),
|
||||
},
|
||||
],
|
||||
},
|
||||
column: {
|
||||
width: 400,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="pi-group-selector flex full-w">
|
||||
<div class="flex-1">
|
||||
<fs-dict-select :value="modelValue" :dict="groupDictRef" :allow-clear="true" @update:value="doUpdate"></fs-dict-select>
|
||||
</div>
|
||||
|
||||
<fs-table-select
|
||||
class="flex-0"
|
||||
:create-crud-options="createCrudOptions"
|
||||
:crud-options-override="{
|
||||
search: { show: false, initialForm: { type: props.type } },
|
||||
table: {
|
||||
scroll: {
|
||||
x: 540,
|
||||
},
|
||||
},
|
||||
}"
|
||||
:model-value="modelValue"
|
||||
:dict="groupDictRef"
|
||||
:show-current="false"
|
||||
:show-select="false"
|
||||
:dialog="{ width: 960 }"
|
||||
:destroy-on-close="false"
|
||||
height="400px"
|
||||
@update:model-value="doUpdate"
|
||||
@dialog-closed="doRefresh"
|
||||
>
|
||||
<template #default="scope">
|
||||
<fs-button class="ml-5" type="primary" icon="ant-design:edit-outlined" @click="scope.open({ context: { type: props.type } })"></fs-button>
|
||||
</template>
|
||||
</fs-table-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { createGroupDictRef } from "./api";
|
||||
import createCrudOptions from "./crud";
|
||||
import { dict, FsDictSelect } from "@fast-crud/fast-crud";
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue?: number;
|
||||
type: string;
|
||||
}>();
|
||||
|
||||
defineOptions({
|
||||
name: "GroupSelector",
|
||||
});
|
||||
const groupDictRef = createGroupDictRef(props.type);
|
||||
const emit = defineEmits(["refresh", "update:modelValue", "change"]);
|
||||
function doRefresh() {
|
||||
emit("refresh");
|
||||
groupDictRef.reloadDict();
|
||||
}
|
||||
|
||||
function doUpdate(value: any) {
|
||||
emit("update:modelValue", value);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<fs-page>
|
||||
<template #header>
|
||||
<div class="title">
|
||||
分组管理
|
||||
<span class="sub">流水线分组</span>
|
||||
</div>
|
||||
</template>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
|
||||
export default defineComponent({
|
||||
name: "BasicGroupManager",
|
||||
setup() {
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
onActivated(() => {
|
||||
crudExpose.doRefresh();
|
||||
});
|
||||
|
||||
return {
|
||||
crudBinding,
|
||||
crudRef,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -57,4 +57,3 @@ export async function DeleteBatch(ids: any[]) {
|
||||
data: { ids },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
column: {
|
||||
width: 120,
|
||||
align: "center",
|
||||
align: "left",
|
||||
cellRender({ value, row }) {
|
||||
async function resetStatus() {
|
||||
Modal.confirm({
|
||||
@@ -202,7 +202,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div class={"flex flex-center"}>
|
||||
<div class={"flex flex-left"}>
|
||||
<fs-values-format modelValue={value} dict={dictRef}></fs-values-format>
|
||||
{row.error && (
|
||||
<a-tooltip title={row.error}>
|
||||
@@ -268,8 +268,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
},
|
||||
mainDomain: {
|
||||
title: t("certd.mainDomain"),
|
||||
type: "text",
|
||||
form: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
createTime: {
|
||||
title: t("certd.create_time"),
|
||||
title: t("certd.createTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
@@ -281,7 +288,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
updateTime: {
|
||||
title: t("certd.update_time"),
|
||||
title: t("certd.updateTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
|
||||
@@ -35,6 +35,14 @@ export const siteInfoApi = {
|
||||
});
|
||||
},
|
||||
|
||||
async BatchDelObj(ids: number[]) {
|
||||
return await request({
|
||||
url: apiPrefix + "/batchDelete",
|
||||
method: "post",
|
||||
data: { ids },
|
||||
});
|
||||
},
|
||||
|
||||
async GetObj(id: number) {
|
||||
return await request({
|
||||
url: apiPrefix + "/info",
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
// @ts-ignore
|
||||
import { useI18n } from "/src/locales";
|
||||
import { AddReq, ColumnCompositionProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { AddReq, ColumnCompositionProps, ColumnProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DataFormatterContext, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { siteInfoApi } from "./api";
|
||||
import * as settingApi from "./setting/api";
|
||||
import dayjs from "dayjs";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import { message, Modal, notification } from "ant-design-vue";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { mySuiteApi } from "/@/views/certd/suite/mine/api";
|
||||
import { mitter } from "/@/utils/util.mitt";
|
||||
import { useSiteIpMonitor } from "./ip/use";
|
||||
import { useSiteImport } from "/@/views/certd/monitor/site/use";
|
||||
|
||||
import { ref } from "vue";
|
||||
import GroupSelector from "../../basic/group/group-selector.vue";
|
||||
import { createGroupDictRef } from "../../basic/group/api";
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const { t } = useI18n();
|
||||
const api = siteInfoApi;
|
||||
@@ -47,6 +50,35 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
|
||||
const { openSiteImportDialog } = useSiteImport();
|
||||
|
||||
const certValidDaysRef = ref(10);
|
||||
|
||||
async function loadSetting() {
|
||||
const setting = await settingApi.SiteMonitorSettingsGet();
|
||||
certValidDaysRef.value = setting?.certValidDays || 10;
|
||||
}
|
||||
loadSetting();
|
||||
|
||||
const selectedRowKeys = ref([]);
|
||||
|
||||
const handleBatchDelete = () => {
|
||||
if (selectedRowKeys.value?.length > 0) {
|
||||
Modal.confirm({
|
||||
title: "确认",
|
||||
content: `确定要批量删除这${selectedRowKeys.value.length}条记录吗`,
|
||||
async onOk() {
|
||||
await api.BatchDelObj(selectedRowKeys.value);
|
||||
message.info("删除成功");
|
||||
crudExpose.doRefresh();
|
||||
selectedRowKeys.value = [];
|
||||
},
|
||||
});
|
||||
} else {
|
||||
message.error("请先勾选记录");
|
||||
}
|
||||
};
|
||||
|
||||
context.handleBatchDelete = handleBatchDelete;
|
||||
|
||||
function checkAll() {
|
||||
Modal.confirm({
|
||||
title: t("certd.monitor.confirmTitle"), // "确认"
|
||||
@@ -60,6 +92,16 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const GroupTypeSite = "site";
|
||||
const groupDictRef = createGroupDictRef(GroupTypeSite);
|
||||
|
||||
function getDefaultGroupId() {
|
||||
const searchFrom = crudExpose.getSearchValidatedFormData();
|
||||
if (searchFrom.groupId) {
|
||||
return searchFrom.groupId;
|
||||
}
|
||||
}
|
||||
return {
|
||||
id: "siteMonitorCrud",
|
||||
crudOptions: {
|
||||
@@ -69,6 +111,68 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
editRequest,
|
||||
delRequest,
|
||||
},
|
||||
tabs: {
|
||||
name: "groupId",
|
||||
show: true,
|
||||
},
|
||||
toolbar: {
|
||||
buttons: {
|
||||
export: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
export: {
|
||||
dataFrom: "search",
|
||||
columnFilter: (col: ColumnProps) => {
|
||||
//列过滤器,返回true则导出该列
|
||||
//例如: 只导出show=true的列
|
||||
return col.show === true;
|
||||
},
|
||||
dataFormatter: (opts: DataFormatterContext) => {
|
||||
//例如 格式化日期
|
||||
const { row, originalRow, col, exportCol } = opts;
|
||||
const key = col.key;
|
||||
const element = originalRow[key];
|
||||
if (key.includes("Time") && element) {
|
||||
row[key] = dayjs(element).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
|
||||
if (col.width) {
|
||||
exportCol.width = col.width / 10;
|
||||
}
|
||||
|
||||
if (col.key === "certInfo" && originalRow?.certProvider) {
|
||||
row[key] = originalRow?.certProvider + " " + originalRow?.certDomains;
|
||||
}
|
||||
|
||||
//参数说明
|
||||
// DataFormatterContext = {row: any,originalRow: any, key: string, col: ColumnProps, exportCol:ExportColumn}
|
||||
// row = 当前行数据
|
||||
// originalRow = 当前行原始数据
|
||||
// key = 当前列的key
|
||||
// col = 当前列的配置
|
||||
// exportCol = 当前列的导出配置
|
||||
},
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
pageSizeOptions: ["10", "20", "50", "100", "200"],
|
||||
},
|
||||
settings: {
|
||||
plugins: {
|
||||
//这里使用行选择插件,生成行选择crudOptions配置,最终会与crudOptions合并
|
||||
rowSelection: {
|
||||
enabled: true,
|
||||
props: {
|
||||
multiple: true,
|
||||
crossPage: false,
|
||||
selectedRowKeys: () => {
|
||||
return selectedRowKeys;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
form: {
|
||||
labelCol: {
|
||||
//固定label宽度
|
||||
@@ -112,7 +216,10 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
}
|
||||
}
|
||||
|
||||
await crudExpose.openAdd({});
|
||||
const defaultGroupId = getDefaultGroupId();
|
||||
await crudExpose.openAdd({
|
||||
row: { groupId: defaultGroupId },
|
||||
});
|
||||
},
|
||||
},
|
||||
//导入按钮
|
||||
@@ -121,7 +228,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
text: t("certd.monitor.bulkImport"),
|
||||
type: "primary",
|
||||
async click() {
|
||||
const defaultGroupId = getDefaultGroupId();
|
||||
openSiteImportDialog({
|
||||
defaultGroupId,
|
||||
afterSubmit() {
|
||||
crudExpose.doRefresh();
|
||||
},
|
||||
@@ -173,10 +282,10 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
},
|
||||
},
|
||||
},
|
||||
tabs: {
|
||||
name: "disabled",
|
||||
show: true,
|
||||
},
|
||||
// tabs: {
|
||||
// name: "disabled",
|
||||
// show: true,
|
||||
// },
|
||||
columns: {
|
||||
id: {
|
||||
title: "ID",
|
||||
@@ -357,6 +466,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
column: {
|
||||
sorter: true,
|
||||
width: 155,
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
certExpiresTime: {
|
||||
@@ -385,10 +495,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
column: {
|
||||
conditionalRender: false,
|
||||
cellRender({ row }) {
|
||||
const {
|
||||
certEffectiveTime: effectiveTime,
|
||||
certExpiresTime: expiresTime,
|
||||
} = row || {};
|
||||
const certValidDays = certValidDaysRef.value;
|
||||
const { certEffectiveTime: effectiveTime, certExpiresTime: expiresTime } = row || {};
|
||||
if (!expiresTime) {
|
||||
return "-";
|
||||
}
|
||||
@@ -400,13 +508,53 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
const effectiveDays = Math.max(90, dayjs(expiresTime).diff(applyDate, "day"));
|
||||
// 距离失效时间剩余天数
|
||||
const leftDays = dayjs(expiresTime).diff(dayjs(), "day");
|
||||
const color = leftDays < 20 ? "red" : "#389e0d";
|
||||
const color = leftDays < certValidDays ? "red" : "#389e0d";
|
||||
const percent = (leftDays / effectiveDays) * 100;
|
||||
// console.log('cellRender', 'effectiveDays', effectiveDays, 'expiresTime', expiresTime, 'applyTime', applyTime, 'percent', percent, row)
|
||||
return <a-progress title={expireDate + t("certd.monitor.expired")} percent={percent} strokeColor={color} format={(percent: number) => `${leftDays}${t("certd.monitor.days")}`} />;
|
||||
},
|
||||
},
|
||||
},
|
||||
groupId: {
|
||||
title: t("certd.fields.group"),
|
||||
type: "dict-select",
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
dict: groupDictRef,
|
||||
form: {
|
||||
component: {
|
||||
name: GroupSelector,
|
||||
vModel: "modelValue",
|
||||
type: GroupTypeSite,
|
||||
onRefresh() {
|
||||
groupDictRef.reloadDict();
|
||||
},
|
||||
},
|
||||
},
|
||||
column: {
|
||||
width: 130,
|
||||
align: "center",
|
||||
component: {
|
||||
color: "auto",
|
||||
},
|
||||
sorter: true,
|
||||
},
|
||||
},
|
||||
remark: {
|
||||
title: t("certd.monitor.remark"),
|
||||
search: {
|
||||
show: false,
|
||||
},
|
||||
type: "text",
|
||||
column: {
|
||||
width: 200,
|
||||
sorter: true,
|
||||
cellRender({ value }) {
|
||||
return <a-tooltip title={value}>{value}</a-tooltip>;
|
||||
},
|
||||
},
|
||||
},
|
||||
lastCheckTime: {
|
||||
title: t("certd.monitor.lastCheckTime"),
|
||||
search: {
|
||||
@@ -574,6 +722,21 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
error: {
|
||||
title: t("certd.monitor.error"),
|
||||
search: {
|
||||
show: false,
|
||||
},
|
||||
type: "text",
|
||||
form: { show: false },
|
||||
column: {
|
||||
width: 200,
|
||||
sorter: true,
|
||||
cellRender({ value }) {
|
||||
return <a-tooltip title={value}>{value}</a-tooltip>;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -15,23 +15,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||
<template #pagination-left>
|
||||
<a-tooltip title="批量删除">
|
||||
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</fs-crud>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
import { onActivated, onMounted } from "vue";
|
||||
import createCrudOptions from "./crud";
|
||||
import { siteInfoApi } from "./api";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import { useI18n } from "/src/locales";
|
||||
|
||||
const { t } = useI18n();
|
||||
defineOptions({
|
||||
name: "SiteCertMonitor",
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
const handleBatchDelete = context.handleBatchDelete;
|
||||
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
|
||||
@@ -6,6 +6,7 @@ export type UserSiteMonitorSetting = {
|
||||
retryTimes?: number;
|
||||
cron?: string;
|
||||
dnsServer?: string[];
|
||||
certValidDays?: number;
|
||||
};
|
||||
|
||||
export async function SiteMonitorSettingsGet() {
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
</div>
|
||||
<div class="helper">{{ t("certd.monitor.setting.monitorRetryTimes") }}</div>
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('certd.monitor.setting.certValidDays')" :name="['certValidDays']">
|
||||
<div class="flex">
|
||||
<a-input-number v-model:value="formState.certValidDays" />
|
||||
</div>
|
||||
<div class="helper">{{ t("certd.monitor.setting.certValidDaysHelper") }}</div>
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('certd.monitor.setting.dnsServer')" :name="['dnsServer']">
|
||||
<div class="flex">
|
||||
<a-select v-model:value="formState.dnsServer" mode="tags" :open="false" />
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import { siteInfoApi } from "./api";
|
||||
import { useI18n } from "/src/locales";
|
||||
|
||||
import GroupSelector from "../../basic/group/group-selector.vue";
|
||||
export function useSiteImport() {
|
||||
const { t } = useI18n();
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
|
||||
async function openSiteImportDialog(opts: { afterSubmit: any }) {
|
||||
const { afterSubmit } = opts;
|
||||
async function openSiteImportDialog(opts: { afterSubmit: any; defaultGroupId?: number }) {
|
||||
const { afterSubmit, defaultGroupId } = opts;
|
||||
await openCrudFormDialog<any>({
|
||||
crudOptions: {
|
||||
columns: {
|
||||
@@ -26,6 +26,21 @@ export function useSiteImport() {
|
||||
},
|
||||
},
|
||||
},
|
||||
groupId: {
|
||||
type: "select",
|
||||
title: t("certd.fields.group"),
|
||||
form: {
|
||||
value: defaultGroupId,
|
||||
component: {
|
||||
name: GroupSelector,
|
||||
vModel: "modelValue",
|
||||
type: "site",
|
||||
},
|
||||
col: {
|
||||
span: 24,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
form: {
|
||||
|
||||
@@ -6,12 +6,13 @@ import { useRouter } from "vue-router";
|
||||
import { compute, CreateCrudOptionsRet, dict, useFormWrapper } from "@fast-crud/fast-crud";
|
||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||
import { useReference } from "/@/use/use-refrence";
|
||||
import { ref } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
import * as api from "../api";
|
||||
import { PluginGroup, usePluginStore } from "/@/store/plugin";
|
||||
import { createNotificationApi } from "/@/views/certd/notification/api";
|
||||
import GroupSelector from "../group/group-selector.vue";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
|
||||
export function fillPipelineByDefaultForm(pipeline: any, form: any) {
|
||||
const triggers = [];
|
||||
@@ -78,6 +79,7 @@ export function useCertPipelineCreator() {
|
||||
const { openCrudFormDialog } = useFormWrapper();
|
||||
|
||||
const pluginStore = usePluginStore();
|
||||
const settingStore = useSettingStore();
|
||||
const router = useRouter();
|
||||
|
||||
function createCrudOptions(certPlugins: any[], getFormData: any, doSubmit: any): CreateCrudOptionsRet {
|
||||
@@ -251,7 +253,48 @@ export function useCertPipelineCreator() {
|
||||
name: GroupSelector,
|
||||
vModel: "modelValue",
|
||||
},
|
||||
order: 9999,
|
||||
order: 888,
|
||||
},
|
||||
},
|
||||
addToMonitorEnabled: {
|
||||
title: t("certd.pipelineForm.addToMonitorEnabled"),
|
||||
type: "switch",
|
||||
form: {
|
||||
show: computed(() => {
|
||||
return settingStore.isPlus && settingStore.sysPublic?.certDomainAddToMonitorEnabled;
|
||||
}),
|
||||
value: false,
|
||||
component: {
|
||||
name: "a-switch",
|
||||
vModel: "checked",
|
||||
},
|
||||
col: {
|
||||
span: 24,
|
||||
},
|
||||
order: 999,
|
||||
valueChange({ value, form }) {
|
||||
if (value) {
|
||||
form.addToMonitorDomains = form.domains.join("\n").replaceAll("*", "www");
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
addToMonitorDomains: {
|
||||
title: t("certd.pipelineForm.addToMonitorDomains"),
|
||||
type: "text",
|
||||
form: {
|
||||
show: compute(({ form }) => {
|
||||
return form.addToMonitorEnabled;
|
||||
}),
|
||||
component: {
|
||||
name: "a-textarea",
|
||||
vModel: "value",
|
||||
},
|
||||
col: {
|
||||
span: 24,
|
||||
},
|
||||
helper: t("certd.domainList.helper"),
|
||||
order: 999,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -330,6 +373,8 @@ export function useCertPipelineCreator() {
|
||||
keepHistoryCount: 30,
|
||||
type: "cert",
|
||||
groupId,
|
||||
addToMonitorEnabled: form.addToMonitorEnabled,
|
||||
addToMonitorDomains: form.addToMonitorDomains,
|
||||
});
|
||||
if (form.email) {
|
||||
try {
|
||||
|
||||
@@ -366,10 +366,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
},
|
||||
column: {
|
||||
cellRender({ row }) {
|
||||
const {
|
||||
certEffectiveTime: effectiveTime,
|
||||
certExpiresTime: expiresTime,
|
||||
} = row?.lastVars || {};
|
||||
const { certEffectiveTime: effectiveTime, certExpiresTime: expiresTime } = row?.lastVars || {};
|
||||
if (!expiresTime) {
|
||||
return "-";
|
||||
}
|
||||
@@ -469,7 +466,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
},
|
||||
column: {
|
||||
sorter: true,
|
||||
width: 80,
|
||||
width: 100,
|
||||
align: "center",
|
||||
component: {
|
||||
name: "fs-dict-switch",
|
||||
@@ -516,7 +513,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
{ value: "cert", label: t("certd.types.certApply") },
|
||||
{ value: "cert_upload", label: t("certd.types.certUpload") },
|
||||
{ value: "custom", label: t("certd.types.custom") },
|
||||
{ value: "template", label: "模版" },
|
||||
{ value: "template", label: t("certd.types.template") },
|
||||
],
|
||||
}),
|
||||
form: {
|
||||
@@ -525,7 +522,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
},
|
||||
column: {
|
||||
sorter: true,
|
||||
width: 90,
|
||||
width: 110,
|
||||
align: "center",
|
||||
show: true,
|
||||
component: {
|
||||
@@ -558,16 +555,53 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
||||
sorter: true,
|
||||
},
|
||||
},
|
||||
createTime: {
|
||||
title: t("certd.fields.createTime"),
|
||||
type: "datetime",
|
||||
validTime: {
|
||||
title: t("certd.pi.validTime"),
|
||||
type: "date",
|
||||
form: {
|
||||
show: false,
|
||||
show: computed(() => {
|
||||
return settingStore.isPlus && settingStore.sysPublic.pipelineValidTimeEnabled && userStore.isAdmin;
|
||||
}),
|
||||
helper: t("certd.pi.validTimeHelper"),
|
||||
valueResolve({ form, key, value }) {
|
||||
if (value) {
|
||||
form[key] = value.valueOf();
|
||||
}
|
||||
},
|
||||
valueBuilder({ form, key, value }) {
|
||||
if (value) {
|
||||
form[key] = dayjs(value);
|
||||
}
|
||||
},
|
||||
component: {
|
||||
presets: [
|
||||
{ label: t("certd.dates.months", { count: 3 }), value: dayjs().add(3, "month") },
|
||||
{ label: t("certd.dates.months", { count: 6 }), value: dayjs().add(6, "month") },
|
||||
{ label: t("certd.dates.years", { count: 1 }), value: dayjs().add(1, "year") },
|
||||
{ label: t("certd.dates.years", { count: 2 }), value: dayjs().add(2, "year") },
|
||||
{ label: t("certd.dates.years", { count: 3 }), value: dayjs().add(3, "year") },
|
||||
{ label: t("certd.dates.years", { count: 4 }), value: dayjs().add(4, "year") },
|
||||
{ label: t("certd.dates.years", { count: 5 }), value: dayjs().add(5, "year") },
|
||||
{ label: t("certd.dates.years", { count: 6 }), value: dayjs().add(6, "year") },
|
||||
],
|
||||
},
|
||||
},
|
||||
column: {
|
||||
show: computed(() => {
|
||||
return settingStore.isPlus && settingStore.sysPublic.pipelineValidTimeEnabled;
|
||||
}),
|
||||
sorter: true,
|
||||
width: 155,
|
||||
align: "center",
|
||||
cellRender({ value }) {
|
||||
if (!value || value <= 0) {
|
||||
return "-";
|
||||
}
|
||||
if (value < Date.now()) {
|
||||
return t("certd.hasExpired");
|
||||
}
|
||||
return dayjs(value).format("YYYY-MM-DD");
|
||||
},
|
||||
},
|
||||
},
|
||||
updateTime: {
|
||||
|
||||
@@ -37,6 +37,7 @@ const pipelineOptions: PipelineOptions = {
|
||||
type: detail.pipeline.type,
|
||||
from: detail.pipeline.from,
|
||||
},
|
||||
validTime: detail.pipeline.validTime,
|
||||
} as PipelineDetail;
|
||||
},
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
import { onActivated, onMounted, ref } from "vue";
|
||||
import { dict, useFs } from "@fast-crud/fast-crud";
|
||||
import createCrudOptions from "./crud";
|
||||
import PiCertdForm from "./certd-form/index.vue";
|
||||
import ChangeGroup from "./components/change-group.vue";
|
||||
import ChangeTrigger from "./components/change-trigger.vue";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
未设置触发源,不会自动执行
|
||||
</span>
|
||||
</a-tag>
|
||||
<a-tag v-if="pipelineEntity.validTime > 0 && settingStore.sysPublic.pipelineValidTimeEnabled && settingStore.isPlus" :color="pipelineEntity.validTime > Date.now() ? 'green' : 'red'">
|
||||
<span class="flex">
|
||||
<fs-icon icon="ion:time-outline"></fs-icon>
|
||||
<span v-if="pipelineEntity.validTime > Date.now()"> 有效期:<FsTimeHumanize :model-value="pipelineEntity.validTime" :options="{ units: ['d'] }" format="YYYY-MM-DD"></FsTimeHumanize> </span>
|
||||
<span v-else> 已过期 </span>
|
||||
</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
<div class="basis-40 flex justify-end mr-10">
|
||||
<template v-if="editMode">
|
||||
@@ -343,7 +350,7 @@ export default defineComponent({
|
||||
const { t } = useI18n();
|
||||
const currentPipeline: Ref<any> = ref({});
|
||||
const pipeline: Ref<any> = ref({});
|
||||
|
||||
const pipelineEntity: Ref<any> = ref({});
|
||||
const histories: Ref<RunHistory[]> = ref([]);
|
||||
|
||||
const currentHistory: Ref<any> = ref({});
|
||||
@@ -490,6 +497,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
const detail: PipelineDetail = await props.options.getPipelineDetail({ pipelineId: value });
|
||||
pipelineEntity.value = detail;
|
||||
currentPipeline.value = merge(
|
||||
{
|
||||
title: "新管道流程",
|
||||
@@ -808,7 +816,7 @@ export default defineComponent({
|
||||
return nodes;
|
||||
},
|
||||
});
|
||||
throw new Error(errorMessage);
|
||||
throw new Error(errorMessages?.join(","));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -970,6 +978,7 @@ export default defineComponent({
|
||||
nextTriggerTimes,
|
||||
viewCert,
|
||||
downloadCert,
|
||||
pipelineEntity,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@ import { PluginGroups } from "/@/store/plugin";
|
||||
|
||||
export type PipelineDetail = {
|
||||
pipeline: Pipeline;
|
||||
validTime?: number;
|
||||
};
|
||||
|
||||
export type RunHistory = {
|
||||
|
||||
@@ -177,6 +177,8 @@ function isNewVersion(version: string, latestVersion: string) {
|
||||
for (let i = 0; i < current.length; i++) {
|
||||
if (parseInt(latest[i]) > parseInt(current[i])) {
|
||||
return true;
|
||||
} else if (parseInt(latest[i]) < parseInt(current[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -191,7 +193,6 @@ async function loadLatestVersion() {
|
||||
|
||||
const minVersion = settingsStore.productInfo?.app?.minVersion;
|
||||
if (minVersion) {
|
||||
//
|
||||
if (isNewVersion(version.value, minVersion)) {
|
||||
notification.error({
|
||||
message: settingsStore.productInfo?.app?.minVersionTip ?? "版本过低,为了您的数据安全,请尽快升级",
|
||||
|
||||
@@ -95,11 +95,14 @@ import SmsCode from "/@/views/framework/login/sms-code.vue";
|
||||
import { useI18n } from "/@/locales";
|
||||
import { LanguageToggle } from "/@/vben/layouts";
|
||||
import CaptchaInput from "/@/components/captcha/captcha-input.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
export default defineComponent({
|
||||
name: "LoginPage",
|
||||
components: { LanguageToggle, SmsCode, CaptchaInput },
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const urlLoginType = route.query.loginType as string | undefined;
|
||||
const verifyCodeInputRef = ref();
|
||||
const loading = ref(false);
|
||||
const userStore = useUserStore();
|
||||
@@ -110,7 +113,7 @@ export default defineComponent({
|
||||
phoneCode: "86",
|
||||
mobile: "",
|
||||
password: "",
|
||||
loginType: "password", //password
|
||||
loginType: urlLoginType || "password", //password
|
||||
smsCode: "",
|
||||
captcha: null,
|
||||
smsCaptcha: null,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<a-form ref="formRef" class="user-layout-register" name="custom-validation" :model="formState" :rules="rules" v-bind="layout" :label-col="{ span: 6 }" @finish="handleFinish" @finish-failed="handleFinishFailed">
|
||||
<a-tabs v-model:active-key="registerType">
|
||||
<a-tabs v-model:active-key="registerType" @change="handleTabChange">
|
||||
<a-tab-pane key="username" tab="用户名注册" :disabled="!settingsStore.sysPublic.usernameRegisterEnabled">
|
||||
<template v-if="registerType === 'username'">
|
||||
<a-form-item required has-feedback name="username" label="用户名" :rules="rules.username">
|
||||
@@ -70,6 +70,8 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane v-if="settingsStore.sysPublic.smsLoginEnabled" key="mobile" tab="手机号注册"> </a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
<a-form-item>
|
||||
@@ -90,6 +92,7 @@ import EmailCode from "./email-code.vue";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { notification } from "ant-design-vue";
|
||||
import CaptchaInput from "/@/components/captcha/captcha-input.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
export default defineComponent({
|
||||
name: "RegisterPage",
|
||||
components: { CaptchaInput, EmailCode },
|
||||
@@ -171,6 +174,18 @@ export default defineComponent({
|
||||
message: "请输入邮件验证码",
|
||||
},
|
||||
],
|
||||
captcha: [
|
||||
{
|
||||
required: true,
|
||||
message: "请通过验证码",
|
||||
},
|
||||
],
|
||||
imgCode: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入验证码",
|
||||
},
|
||||
],
|
||||
};
|
||||
const layout = {
|
||||
labelCol: {
|
||||
@@ -206,6 +221,13 @@ export default defineComponent({
|
||||
formRef.value.resetFields();
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
const handleTabChange = (key: string) => {
|
||||
if (key === "mobile") {
|
||||
router.push({ path: "/login", query: { loginType: "sms" } });
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
formState,
|
||||
formRef,
|
||||
@@ -216,6 +238,7 @@ export default defineComponent({
|
||||
resetForm,
|
||||
registerType,
|
||||
settingsStore,
|
||||
handleTabChange,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<div class="domain-test-card">
|
||||
<div class="card-header flex flex-wrap justify-start">
|
||||
<div v-if="title">{{ title }}</div>
|
||||
<a-form v-if="editing" layout="inline" :model="formData">
|
||||
<a-form-item label="域名">
|
||||
<a-input v-model:value="formData.domain" placeholder="请输入要测试的域名或IP" style="width: 240px" />
|
||||
</a-form-item>
|
||||
<a-form-item label="端口">
|
||||
<a-input-number v-model:value="formData.port" placeholder="请输入端口" :min="1" :max="65535" style="width: 120px" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<div v-else class="domain-info">
|
||||
<span>域名: {{ formData.domain }}</span>
|
||||
<span>端口: {{ formData.port }}</span>
|
||||
</div>
|
||||
|
||||
<a-button :disabled="!formData.domain" size="small" type="primary" :loading="loading" @click="runAllTests"> 开始测试 </a-button>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<div class="test-results">
|
||||
<!-- 域名解析结果 -->
|
||||
<test-case ref="domainResolveRef" title="域名解析" :test-method="() => createDomainResolveMethod()" :disabled="!getCurrentDomain()" />
|
||||
|
||||
<!-- Ping测试结果 -->
|
||||
<test-case ref="pingTestRef" title="Ping测试" :test-method="() => createPingTestMethod()" :disabled="!getCurrentDomain()" />
|
||||
|
||||
<!-- Telnet测试结果 -->
|
||||
<test-case ref="telnetTestRef" title="Telnet测试" :port="getCurrentPort()" :test-method="() => createTelnetTestMethod()" :disabled="!getCurrentDomain() || !getCurrentPort()" />
|
||||
</div>
|
||||
|
||||
<div class="summary">
|
||||
<a-alert :message="testSummary.title" :type="testSummary.status === 'success' ? 'success' : testSummary.status === 'failed' ? 'error' : 'warning'" show-icon :closable="false">
|
||||
<template v-if="testSummary.text" #description>
|
||||
<pre class="summary-text pre">{{ testSummary.text }}</pre>
|
||||
</template>
|
||||
</a-alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, computed, onMounted, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { DomainResolve, PingTest, TelnetTest } from "./api";
|
||||
import TestCase from "./TestCase.vue";
|
||||
|
||||
// 组件属性
|
||||
const props = defineProps<{
|
||||
title?: string;
|
||||
domain?: string;
|
||||
port?: number;
|
||||
autoStart?: boolean;
|
||||
}>();
|
||||
|
||||
const editing = ref(!props.domain);
|
||||
|
||||
// 测试组件的引用
|
||||
const domainResolveRef = ref();
|
||||
const pingTestRef = ref();
|
||||
const telnetTestRef = ref();
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
domain: props.domain || "",
|
||||
port: props.port || 443,
|
||||
});
|
||||
|
||||
// 加载状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 创建域名解析测试方法
|
||||
const createDomainResolveMethod = async () => {
|
||||
const domain = getCurrentDomain();
|
||||
return DomainResolve(domain);
|
||||
};
|
||||
|
||||
// 创建Ping测试方法
|
||||
const createPingTestMethod = async () => {
|
||||
const domain = getCurrentDomain();
|
||||
return PingTest(domain);
|
||||
};
|
||||
|
||||
// 创建Telnet测试方法
|
||||
const createTelnetTestMethod = async () => {
|
||||
const domain = getCurrentDomain();
|
||||
const port = getCurrentPort();
|
||||
|
||||
return TelnetTest(domain, port);
|
||||
};
|
||||
|
||||
// 获取当前使用的域名
|
||||
const getCurrentDomain = () => {
|
||||
return formData.domain;
|
||||
};
|
||||
|
||||
// 获取当前使用的端口
|
||||
const getCurrentPort = () => {
|
||||
return formData.port;
|
||||
};
|
||||
|
||||
// 获取各测试用例的状态
|
||||
const getTestStatus = (testRef: any) => {
|
||||
const result = testRef?.getResult();
|
||||
if (!result) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const isNetTestResult = typeof result === "object" && result !== null && "success" in result && "message" in result;
|
||||
|
||||
return {
|
||||
success: isNetTestResult ? result.success : false,
|
||||
message: isNetTestResult ? result.message : "测试失败",
|
||||
};
|
||||
};
|
||||
|
||||
// 生成测试总结
|
||||
const testSummary = computed(() => {
|
||||
if (loading.value) {
|
||||
return { status: "waiting", title: "测试中,请稍后..." };
|
||||
}
|
||||
// 通过computed获取各测试结果
|
||||
const domainResolveResult = getTestStatus(domainResolveRef.value);
|
||||
const pingTestResult = getTestStatus(pingTestRef.value);
|
||||
const telnetTestResult = getTestStatus(telnetTestRef.value);
|
||||
|
||||
// 检查是否有测试结果
|
||||
const testDone = domainResolveResult != null && pingTestResult != null && telnetTestResult != null;
|
||||
if (!testDone) {
|
||||
return { status: "waiting", title: '请点击"开始测试"按钮进行网络测试' };
|
||||
}
|
||||
|
||||
// 详细分析不同的测试结果组合
|
||||
// 1. 三个测试都失败
|
||||
if (domainResolveResult?.success === false && pingTestResult?.success === false && telnetTestResult?.success === false) {
|
||||
return {
|
||||
status: "failed",
|
||||
title: "所有测试均未通过",
|
||||
text: `这表明应用容器内的网络可能完全不通。建议:\n1. 检查宿主机的网络连接状态\n2. 确认容器网络配置是否正确\n3. 检查防火墙设置是否阻止了网络访问`,
|
||||
};
|
||||
}
|
||||
|
||||
// 2. 域名解析成功,但Ping不通
|
||||
if (domainResolveResult?.success === true && pingTestResult?.success === false) {
|
||||
return {
|
||||
status: "partial",
|
||||
title: "域名解析成功,但Ping不通",
|
||||
text: `可能原因:\n1. DNS被劫持,解析到了错误的IP地址\n2. 目标服务器禁止了Ping请求\n3. 目标服务器IP被墙\n4. 目标服务器网络不通或已下线`,
|
||||
};
|
||||
}
|
||||
|
||||
// 3. 域名解析和Ping都成功,但Telnet连接失败
|
||||
if (domainResolveResult?.success === true && pingTestResult?.success === true && telnetTestResult?.success === false) {
|
||||
return {
|
||||
status: "partial",
|
||||
title: "域名解析和Ping测试均通过,但Telnet连接失败",
|
||||
text: `可能原因:\n1. 端口号输入错误,请确认目标服务使用的正确端口\n2. 目标服务器上该端口未开放或服务未启动\n3. 防火墙或安全组限制了该端口的访问\n4. 目标网站被墙`,
|
||||
};
|
||||
}
|
||||
|
||||
// 4. 域名解析失败,但其他测试可能成功或未执行
|
||||
if (domainResolveResult?.success === false) {
|
||||
return {
|
||||
status: "partial",
|
||||
title: "域名解析失败",
|
||||
text: `可能原因:\n1. 域名输入错误或不存在\n2. DNS服务器配置问题\n3. 本地网络DNS解析故障\n4. 域名已过期或被注销`,
|
||||
};
|
||||
}
|
||||
|
||||
// 5. 所有测试都成功
|
||||
if (domainResolveResult?.success === true && pingTestResult?.success === true && telnetTestResult?.success === true) {
|
||||
return {
|
||||
status: "success",
|
||||
title: "所有测试均通过",
|
||||
text: `域名${formData.domain}解析正常,能够正常Ping通,且端口${formData.port}可访问。`,
|
||||
};
|
||||
}
|
||||
|
||||
// 6. 其他部分成功的情况
|
||||
return {
|
||||
status: "partial",
|
||||
title: "部分测试未通过",
|
||||
text: `请结合具体测试结果进行分析:\n- 域名解析:${domainResolveResult ? (domainResolveResult.success ? "成功" : "失败") : "未执行"}\n- Ping测试:${pingTestResult ? (pingTestResult.success ? "成功" : "失败") : "未执行"}\n- Telnet测试:${telnetTestResult ? (telnetTestResult.success ? "成功" : "失败") : "未执行"}`,
|
||||
};
|
||||
});
|
||||
|
||||
// 运行全部测试
|
||||
async function runAllTests() {
|
||||
const domain = getCurrentDomain();
|
||||
|
||||
// 检查是否有域名
|
||||
if (!domain) {
|
||||
message.error("请输入域名");
|
||||
return;
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 通过组件引用调用测试方法
|
||||
try {
|
||||
await Promise.allSettled([domainResolveRef.value?.test(), pingTestRef.value?.test(), telnetTestRef.value?.test()]);
|
||||
} catch (error) {
|
||||
message.error("部分测试执行失败,请查看详细结果");
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.autoStart) {
|
||||
runAllTests();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.domain-test-card {
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background-color: #fafafa;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.card-header h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.input-form {
|
||||
margin-bottom: 12px;
|
||||
padding: 12px;
|
||||
background-color: #fafafa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.domain-info {
|
||||
padding: 5.5px 12px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.test-buttons {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.test-results {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin-top: 16px;
|
||||
padding: 12px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
.summary-text {
|
||||
}
|
||||
}
|
||||
|
||||
/* 调整按钮大小 */
|
||||
.ant-btn {
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<a-card title="服务端信息" class="server-info-card">
|
||||
<template #extra>
|
||||
<a-button size="small" :loading="loading" @click="refreshServerInfo">
|
||||
<template #icon>
|
||||
<a-icon type="sync" :spin="loading" />
|
||||
</template>
|
||||
刷新
|
||||
</a-button>
|
||||
</template>
|
||||
<div v-if="loading" class="loading">
|
||||
<a-spin size="small" />
|
||||
<span style="margin-left: 8px">加载中...</span>
|
||||
</div>
|
||||
<div v-else-if="error" class="error">
|
||||
<a-alert message="获取服务器信息失败" :description="error" type="error" show-icon />
|
||||
</div>
|
||||
<div v-else class="server-info-grid">
|
||||
<!-- 本地IP -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">本地IP:</div>
|
||||
<div v-if="serverInfo.localIP && serverInfo.localIP.length > 0" class="info-value">
|
||||
<a-tag v-for="ip in serverInfo.localIP" :key="ip" type="info" color="blue">{{ ip }}</a-tag>
|
||||
</div>
|
||||
<div v-else class="info-empty">暂无信息</div>
|
||||
</div>
|
||||
|
||||
<!-- 外网IP -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">外网IP:</div>
|
||||
<div v-if="serverInfo.publicIP && serverInfo.publicIP.length > 0" class="info-value">
|
||||
<a-tag v-for="ip in serverInfo.publicIP" :key="ip" type="info" color="green">{{ ip }}</a-tag>
|
||||
</div>
|
||||
<div v-else class="info-empty">暂无信息</div>
|
||||
</div>
|
||||
|
||||
<!-- DNS服务器 -->
|
||||
<div class="info-item">
|
||||
<div class="info-label">DNS服务器:</div>
|
||||
<div v-if="serverInfo.dnsServers && serverInfo.dnsServers.length > 0" class="info-value">
|
||||
<a-tag v-for="dns in serverInfo.dnsServers" :key="dns" type="info" color="cyan">{{ dns }}</a-tag>
|
||||
</div>
|
||||
<div v-else class="info-empty">暂无信息</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { GetServerInfo } from "./api";
|
||||
|
||||
// 服务器信息类型
|
||||
interface ServerInfo {
|
||||
localIP?: string[];
|
||||
publicIP?: string[];
|
||||
dnsServers?: string[];
|
||||
}
|
||||
|
||||
const loading = ref(false);
|
||||
const error = ref<string | null>(null);
|
||||
const serverInfo = ref<ServerInfo>({});
|
||||
|
||||
// 加载服务器信息
|
||||
const loadServerInfo = async () => {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
try {
|
||||
serverInfo.value = await GetServerInfo();
|
||||
} catch (e) {
|
||||
error.value = e instanceof Error ? e.message : String(e);
|
||||
message.error("获取服务器信息失败");
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 刷新服务器信息
|
||||
const refreshServerInfo = () => {
|
||||
loadServerInfo();
|
||||
};
|
||||
|
||||
// 组件挂载时加载数据
|
||||
onMounted(() => {
|
||||
loadServerInfo();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.server-info-card {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.server-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
background-color: #fafafa;
|
||||
border-radius: 4px;
|
||||
padding: 12px;
|
||||
|
||||
.info-label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
|
||||
.ant-list-item {
|
||||
padding: 4px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.info-empty {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
186
packages/ui/certd-client/src/views/sys/nettest/TestCase.vue
Normal file
186
packages/ui/certd-client/src/views/sys/nettest/TestCase.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<div class="test-case" :class="{ loading }">
|
||||
<div class="case-header">
|
||||
<span class="flex items-center">
|
||||
<fs-button size="small" type="text" icon="ion:play-circle" :loading="loading" :disabled="disabled" class="test-button" @click="runTest" />
|
||||
<a-tag color="blue" class="case-title">
|
||||
{{ title }}
|
||||
</a-tag>
|
||||
<span v-if="port" class="port-info">{{ port }}</span>
|
||||
</span>
|
||||
<span v-if="result && isNetTestResult" class="result-status flex-1" :style="{ color: isSuccess ? 'green' : 'red' }">
|
||||
<span>
|
||||
{{ isSuccess ? "✓" : "✗" }}
|
||||
</span>
|
||||
<span class="ml-2">
|
||||
{{ result.message }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="result" class="result-content">
|
||||
<div v-if="error" class="error-message">
|
||||
<span style="color: red">{{ error }}</span>
|
||||
</div>
|
||||
<div v-else-if="isNetTestResult">
|
||||
<div v-if="resultTestLog" class="test-log">
|
||||
<pre>{{ resultTestLog }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="typeof result === 'object'" class="object-result">
|
||||
<pre>{{ JSON.stringify(result, null, 2) }}</pre>
|
||||
</div>
|
||||
<div v-else class="text-result">
|
||||
<pre>{{ result }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="no-result">
|
||||
<p>暂无结果</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
|
||||
// 组件属性
|
||||
const props = defineProps<{
|
||||
title: string;
|
||||
port?: number | string;
|
||||
testMethod: () => Promise<any>;
|
||||
disabled?: boolean;
|
||||
}>();
|
||||
|
||||
// 内部状态
|
||||
const loading = ref(false);
|
||||
const result = ref<any>(null);
|
||||
const error = ref<string | null>(null);
|
||||
|
||||
// 运行测试
|
||||
const runTest = async () => {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
result.value = null;
|
||||
try {
|
||||
const testResult = await props.testMethod();
|
||||
// 如果结果有 data 属性,则使用 data,否则使用整个结果
|
||||
result.value = testResult.data || testResult;
|
||||
} catch (err: any) {
|
||||
result.value = null;
|
||||
error.value = err.message || "测试失败";
|
||||
message.error(`${props.title} 测试失败: ${error.value}`);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
test: runTest,
|
||||
getResult: () => result.value,
|
||||
});
|
||||
|
||||
// 辅助计算属性,用于模板中显示结果
|
||||
const isNetTestResult = computed(() => {
|
||||
return typeof result.value === "object" && result.value !== null && "success" in result.value && "message" in result.value && "testLog" in result.value;
|
||||
});
|
||||
|
||||
const isSuccess = computed(() => {
|
||||
return isNetTestResult.value && result.value.success;
|
||||
});
|
||||
|
||||
const resultMessage = computed(() => {
|
||||
return isNetTestResult.value ? result.value.message : "";
|
||||
});
|
||||
|
||||
const resultTestLog = computed(() => {
|
||||
return isNetTestResult.value ? result.value.testLog : "";
|
||||
});
|
||||
|
||||
const resultError = computed(() => {
|
||||
return isNetTestResult.value ? result.value.error : "";
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.test-case {
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
position: relative;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
&.loading {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.case-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.result-status {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.case-title {
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.port-info {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
background-color: #f0f0f0;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.test-button {
|
||||
color: #1890ff;
|
||||
font-size: 12px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.result-content {
|
||||
.error-message,
|
||||
.object-result,
|
||||
.text-result {
|
||||
background-color: #f8f8f8;
|
||||
padding: 8px 10px;
|
||||
border-radius: 3px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.test-log {
|
||||
background-color: #f8f8f8;
|
||||
padding: 8px 10px;
|
||||
border-radius: 3px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.no-result {
|
||||
padding: 12px 0;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user