From e30db9ee77e350264a7f3a771761c9f33a2b14db Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Sun, 21 Sep 2025 17:33:44 +0800 Subject: [PATCH 01/95] docs: --- docs/guide/use/baota/white_list.md | 35 +++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/guide/use/baota/white_list.md b/docs/guide/use/baota/white_list.md index e09440171..778e225d3 100644 --- a/docs/guide/use/baota/white_list.md +++ b/docs/guide/use/baota/white_list.md @@ -1,11 +1,40 @@ # 宝塔IP白名单与动态IP问题 调用宝塔接口需要添加IP白名单,但当certd部署在动态IP环境下时,IP白名单就不好添加 -本章节提供一种代理解决方案 +本章节提供两种解决方案: +1. 小范围网段放开(简单) +2. nginx代理 + +## 一、放开小范围网段 + +家庭网络IP虽然会变动,但是只会在小范围变的。 + +你可以分析规律,将变动的部分,设置成网段即可 + +> 比如出现过: 100.25.1.5 , 100.25.1.8 +> +> 那么你可以配置 100.25.1.1-100.25.1.255 -## nginx代理方案 +> 如果出现过: 100.25.1.5 , 100.25.4.8 +> +> 可以尝试配置 100.25.*.5 -通过在宝塔中配置一个nginx反向代理宝塔自己的地址,然后在nginx中配置放开certd需要的接口,缩小影响范围 +## 二、nginx代理方案 + +通过在宝塔中配置一个nginx反向代理,代理宝塔自己的地址 + +然后在nginx中配置放开certd需要的接口,缩小影响范围 + +让nginx来充当防火墙 + +架构图如下: +``` + 只要将127.0.0.1加入白名单即可 + ↓ +certd --------> nginx -------> 宝塔 + ↑ + 拦截除更新证书之外的地址 +``` ### 1. 添加nginx反向代理 ![](./images/white-1.png) From 9cc5f0f889d4362ff36e7a1f0e448e02d32ecee7 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 22 Sep 2025 23:29:55 +0800 Subject: [PATCH 02/95] =?UTF-8?q?perf:=20=E5=85=AC=E5=85=B1cname=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cname/service/cname-record-service.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts index bf2520182..b1757ba04 100644 --- a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts +++ b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts @@ -113,15 +113,13 @@ export class CnameRecordService extends BaseService { const randomKey = utils.id.simpleNanoId(6).toLowerCase(); - let userIdHash = "" - if(param.cnameProviderId < 0){ - //公共cname服务 - userIdHash = utils.hash.md5(`userId${userId}_${randomKey}`).substring(0, 10) - }else{ - const installInfo = await this.sysSettingsService.getSetting(SysInstallInfo) - userIdHash = utils.hash.md5(`${installInfo.siteId}_${randomKey}`).substring(0, 10) - } - const cnameKey = `${userIdHash}-${randomKey}`; + const userIdHex = utils.hash.toHex(userId) + let userKeyHash = "" + const installInfo = await this.sysSettingsService.getSetting(SysInstallInfo) + userKeyHash = `${installInfo.siteId}_${userIdHex}_${randomKey}` + userKeyHash = utils.hash.md5(userKeyHash).substring(0, 10) + logger.info(`userKeyHash:${userKeyHash},subjectId:${installInfo.siteId},randomKey:${randomKey},userIdHex:${userIdHex}`) + const cnameKey = `${userKeyHash}-${userIdHex}-${randomKey}`; const safeDomain = param.domain.replaceAll('.', '-'); param.recordValue = `${safeDomain}.${cnameKey}.${cnameProvider.domain}`; } From cf3a78e1145ff0505c87fbc485d9e731b1aa88a8 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 22 Sep 2025 23:30:28 +0800 Subject: [PATCH 03/95] =?UTF-8?q?perf:=20dns=E6=94=AF=E6=8C=81=E6=96=B0?= =?UTF-8?q?=E7=BD=91=E5=9F=9F=E5=90=8D=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/basic/src/utils/util.hash.ts | 16 +++ .../src/plugins/plugin-xinnet/access.ts | 40 ++++++++ .../src/plugins/plugin-xinnet/dns-provider.ts | 98 +++++++++++++++++++ .../src/plugins/plugin-xinnet/index.ts | 3 + 4 files changed, 157 insertions(+) create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts create mode 100644 packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts diff --git a/packages/core/basic/src/utils/util.hash.ts b/packages/core/basic/src/utils/util.hash.ts index 303ffa1d7..3b3452bea 100644 --- a/packages/core/basic/src/utils/util.hash.ts +++ b/packages/core/basic/src/utils/util.hash.ts @@ -17,10 +17,26 @@ function base64(data: string) { function base64Decode(data: string) { return Buffer.from(data, "base64").toString("utf8"); } + +function toHex(data: number | string) { + if (typeof data === "number") { + return data.toString(16); + } + return Buffer.from(data).toString("hex"); +} +function hexToStr(data: string) { + return Buffer.from(data, "hex").toString("utf8"); +} +function hexToNumber(data: string) { + return parseInt(data, 16); +} export const hashUtils = { md5, sha256, base64, base64Decode, hmacSha256, + toHex, + hexToStr, + hexToNumber, }; diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts new file mode 100644 index 000000000..f4b136371 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts @@ -0,0 +1,40 @@ +import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline'; + +/** + * 这个注解将注册一个授权配置 + * 在certd的后台管理系统中,用户可以选择添加此类型的授权 + */ +@IsAccess({ + name: 'xinnet', + title: '新网授权', + icon: 'arcticons:dns-changer-3', + desc: '', +}) +export class XinnetAccess extends BaseAccess { + /** + * 授权属性配置 + */ + @AccessInput({ + title: '用户名', + component: { + placeholder: '用户名或手机号', + }, + required: true, + encrypt: false, + }) + username = ''; + + @AccessInput({ + title: '登录密码', + component: { + name:"a-input-password", + vModel:"value", + placeholder: '密码', + }, + required: true, + encrypt: true, + }) + password = ''; +} + +new XinnetAccess(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts new file mode 100644 index 000000000..633db7a93 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts @@ -0,0 +1,98 @@ +import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert"; +import { XinnetAccess } from "./access.js"; +import { XinnetClient } from "@certd/plugin-plus"; + +export type XinnetRecord = { + id: number; + domainId: number, +}; + +// 这里通过IsDnsProvider注册一个dnsProvider +@IsDnsProvider({ + name: 'xinnet', + title: '新网', + desc: '新网域名解析', + icon: 'arcticons:dns-changer-3', + // 这里是对应的 cloudflare的access类型名称 + accessType: 'xinnet', + order:7, +}) +export class XinnetProvider extends AbstractDnsProvider { + access!: XinnetAccess; + + client!:XinnetClient; + async onInstance() { + //一些初始化的操作 + // 也可以通过ctx成员变量传递context + this.access = this.ctx.access as XinnetAccess; + this.client = new XinnetClient({ + logger: this.logger, + access: this.access, + http: this.http + }); + } + + /** + * 创建dns解析记录,用于验证域名所有权 + */ + async createRecord(options: CreateRecordOptions): Promise { + /** + * fullRecord: '_acme-challenge.test.example.com', + * value: 一串uuid + * type: 'TXT', + * domain: 'example.com' + */ + const { fullRecord,hostRecord, value, type, domain } = options; + this.logger.info('添加域名解析:', fullRecord, value, type, domain); + + + + + const domainId = await this.client.getDomainId(domain); + this.logger.info('获取domainId成功:', domainId); + + const res = await this.client.createRecord({ + domain: domain, + domainId: domainId, + type: 'TXT', + host: hostRecord, + data: value, + ttl: 300, + }) + return { + id: res.id, + domainId: domainId, + }; + } + + + /** + * 删除dns解析记录,清理申请痕迹 + * @param options + */ + async removeRecord(options: RemoveRecordOptions): Promise { + const { fullRecord, value } = options.recordReq; + const record = options.recordRes; + this.logger.info('删除域名解析:', fullRecord, value); + if (!record) { + this.logger.info('record为空,不执行删除'); + return; + } + //这里调用删除txt dns解析记录接口 + /** + * 请求示例 + * DELETE /api/record?id=85371689655342080 HTTP/1.1 + * Authorization: Basic {token} + * 请求参数 + */ + const {id,domainId} = record + await this.client.deleteRecord({ + id, + domainId + }) + this.logger.info(`删除域名解析成功:fullRecord=${fullRecord},id=${id}`); + } +} + +//实例化这个provider,将其自动注册到系统中 +new Dns51DnsProvider(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts new file mode 100644 index 000000000..3a9e17436 --- /dev/null +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts @@ -0,0 +1,3 @@ +export * from './dns-provider.js'; +export * from './access.js'; +export * from './client.js'; From 105f0bfde247935dc5795e3d04bbeb8943c06b40 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 23 Sep 2025 00:56:08 +0800 Subject: [PATCH 04/95] chore: --- .../src/plugins/plugin-xinnet/access.ts | 17 +--- .../src/plugins/plugin-xinnet/dns-provider.ts | 94 ++++++++++--------- 2 files changed, 53 insertions(+), 58 deletions(-) diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts index f4b136371..79e7a2619 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts @@ -11,26 +11,15 @@ import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline'; desc: '', }) export class XinnetAccess extends BaseAccess { - /** - * 授权属性配置 - */ - @AccessInput({ - title: '用户名', - component: { - placeholder: '用户名或手机号', - }, - required: true, - encrypt: false, - }) - username = ''; @AccessInput({ - title: '登录密码', + title: '域名登录密码', component: { name:"a-input-password", vModel:"value", - placeholder: '密码', + placeholder: '域名密码', }, + helper:"您可以在此处[重置域名管理密码](https://domain.xinnet.com/#domain/manage/domain_manage_pwd)", required: true, encrypt: true, }) diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts index 633db7a93..b5cf55490 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/dns-provider.ts @@ -25,11 +25,6 @@ export class XinnetProvider extends AbstractDnsProvider { //一些初始化的操作 // 也可以通过ctx成员变量传递context this.access = this.ctx.access as XinnetAccess; - this.client = new XinnetClient({ - logger: this.logger, - access: this.access, - http: this.http - }); } /** @@ -42,27 +37,37 @@ export class XinnetProvider extends AbstractDnsProvider { * type: 'TXT', * domain: 'example.com' */ - const { fullRecord,hostRecord, value, type, domain } = options; - this.logger.info('添加域名解析:', fullRecord, value, type, domain); + // const { fullRecord,hostRecord, value, type, domain } = options; + // this.logger.info('添加域名解析:', fullRecord, value, type, domain); + + // const client = new XinnetClient({ + // logger: this.logger, + // access: { + // domain: "", + // password: this.access.password + // }, + // http: this.http + // }); + // const domainId = await this.client.getDomainId(domain); + // this.logger.info('获取domainId成功:', domainId); + // + // const res = await this.client.createRecord({ + // domain: domain, + // domainId: domainId, + // type: 'TXT', + // host: hostRecord, + // data: value, + // ttl: 300, + // }) + // return { + // id: res.id, + // domainId: domainId, + // }; - const domainId = await this.client.getDomainId(domain); - this.logger.info('获取domainId成功:', domainId); - - const res = await this.client.createRecord({ - domain: domain, - domainId: domainId, - type: 'TXT', - host: hostRecord, - data: value, - ttl: 300, - }) - return { - id: res.id, - domainId: domainId, - }; + return 1 as any } @@ -70,29 +75,30 @@ export class XinnetProvider extends AbstractDnsProvider { * 删除dns解析记录,清理申请痕迹 * @param options */ - async removeRecord(options: RemoveRecordOptions): Promise { - const { fullRecord, value } = options.recordReq; - const record = options.recordRes; - this.logger.info('删除域名解析:', fullRecord, value); - if (!record) { - this.logger.info('record为空,不执行删除'); - return; - } - //这里调用删除txt dns解析记录接口 - /** - * 请求示例 - * DELETE /api/record?id=85371689655342080 HTTP/1.1 - * Authorization: Basic {token} - * 请求参数 - */ - const {id,domainId} = record - await this.client.deleteRecord({ - id, - domainId - }) - this.logger.info(`删除域名解析成功:fullRecord=${fullRecord},id=${id}`); + async removeRecord(options: RemoveRecordOptions): Promise { + // const { fullRecord, value } = options.recordReq; + // const record = options.recordRes; + // this.logger.info('删除域名解析:', fullRecord, value); + // if (!record) { + // this.logger.info('record为空,不执行删除'); + // return; + // } + // //这里调用删除txt dns解析记录接口 + // /** + // * 请求示例 + // * DELETE /api/record?id=85371689655342080 HTTP/1.1 + // * Authorization: Basic {token} + // * 请求参数 + // */ + // const {id,domainId} = record + // await this.client.deleteRecord({ + // id, + // domainId + // }) + // this.logger.info(`删除域名解析成功:fullRecord=${fullRecord},id=${id}`); + // } } } //实例化这个provider,将其自动注册到系统中 -new Dns51DnsProvider(); +new XinnetProvider(); From 298f7d9d52d3e23a28ee3d26452c0a91564345cd Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 23 Sep 2025 23:24:36 +0800 Subject: [PATCH 05/95] =?UTF-8?q?chore:=20=E6=96=B0=E7=BD=91dns=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/libs/lib-server/package.json | 1 + .../libs/lib-server/src/system/basic/index.ts | 1 + .../plugin-cert/src/dns-provider/api.ts | 3 +- .../src/plugin/cert-plugin/index.ts | 1 + .../cname/service/cname-record-service.ts | 8 +- .../service/getter/task-service-getter.ts | 13 +- packages/ui/certd-server/src/plugins/index.ts | 1 + .../src/plugins/plugin-xinnet/access.ts | 62 ++- .../src/plugins/plugin-xinnet/index.ts | 1 - pnpm-lock.yaml | 455 ++++++++++++------ 10 files changed, 395 insertions(+), 151 deletions(-) diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 90f08b2fc..ce4c50c19 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -30,6 +30,7 @@ "@certd/acme-client": "^1.36.21", "@certd/basic": "^1.36.21", "@certd/pipeline": "^1.36.21", + "@certd/plugin-lib": "^1.36.21", "@certd/plus-core": "^1.36.21", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.20.3", diff --git a/packages/libs/lib-server/src/system/basic/index.ts b/packages/libs/lib-server/src/system/basic/index.ts index 920e96115..03a9533c5 100644 --- a/packages/libs/lib-server/src/system/basic/index.ts +++ b/packages/libs/lib-server/src/system/basic/index.ts @@ -1,3 +1,4 @@ export * from './service/plus-service.js'; export * from './service/file-service.js'; export * from './service/encryptor.js'; +export * from './service/ocr-service.js'; diff --git a/packages/plugins/plugin-cert/src/dns-provider/api.ts b/packages/plugins/plugin-cert/src/dns-provider/api.ts index 0fd36b771..6f775ab91 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/api.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/api.ts @@ -1,5 +1,5 @@ import { HttpClient, ILogger, utils } from "@certd/basic"; -import { IAccess, Registrable } from "@certd/pipeline"; +import { IAccess, IServiceGetter, Registrable } from "@certd/pipeline"; export type DnsProviderDefine = Registrable & { accessType: string; @@ -25,6 +25,7 @@ export type DnsProviderContext = { http: HttpClient; utils: typeof utils; domainParser: IDomainParser; + serviceGetter: IServiceGetter; }; export interface IDnsProvider { diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index e4d9ea539..97100fe4c 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -524,6 +524,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin { http: this.ctx.http, utils, domainParser, + serviceGetter: this.ctx.serviceGetter, }; return await createDnsProvider({ dnsProviderType, diff --git a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts index b1757ba04..86d13b3a0 100644 --- a/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts +++ b/packages/ui/certd-server/src/modules/cname/service/cname-record-service.ts @@ -21,6 +21,7 @@ import { DomainParser } from "@certd/plugin-cert/dist/dns-provider/domain-parser import punycode from "punycode.js"; import { SubDomainService } from "../../pipeline/service/sub-domain-service.js"; import { SubDomainsGetter } from "../../pipeline/service/getter/sub-domain-getter.js"; +import { TaskServiceBuilder } from "../../pipeline/service/getter/task-service-getter.js"; type CnameCheckCacheValue = { validating: boolean; @@ -55,6 +56,10 @@ export class CnameRecordService extends BaseService { @Inject() subDomainService: SubDomainService; + @Inject() + taskServiceBuilder: TaskServiceBuilder; + + //@ts-ignore getRepository() { return this.repository; @@ -248,8 +253,9 @@ export class CnameRecordService extends BaseService { }); } + const serviceGetter = this.taskServiceBuilder.create({userId:cnameProvider.userId}) const access = await this.accessService.getById(cnameProvider.accessId, cnameProvider.userId); - const context = {access, logger, http, utils, domainParser}; + const context = {access, logger, http, utils, domainParser,serviceGetter}; const dnsProvider: IDnsProvider = await createDnsProvider({ dnsProviderType: cnameProvider.dnsProviderType, context, diff --git a/packages/ui/certd-server/src/modules/pipeline/service/getter/task-service-getter.ts b/packages/ui/certd-server/src/modules/pipeline/service/getter/task-service-getter.ts index a1f4901b7..19b2bc376 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/getter/task-service-getter.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/getter/task-service-getter.ts @@ -10,6 +10,9 @@ import { DomainVerifierGetter } from "./domain-verifier-getter.js"; import { DomainService } from "../../../cert/service/domain-service.js"; import { SubDomainService } from "../sub-domain-service.js"; +const serviceNames = [ + 'ocrService', +] export class TaskServiceGetter implements IServiceGetter{ private userId: number; private appCtx : IMidwayContainer; @@ -29,8 +32,14 @@ export class TaskServiceGetter implements IServiceGetter{ return await this.getNotificationService() as T } else if (serviceName === 'domainVerifierGetter') { return await this.getDomainVerifierGetter() as T - }else{ - throw new Error(`service ${serviceName} not found`) + } else{ + if(!serviceNames.includes(serviceName)){ + throw new Error(`${serviceName} not in whitelist`) + } + const service = await this.appCtx.getAsync(serviceName) + if (! service){ + throw new Error(`${serviceName} not found`) + } } } diff --git a/packages/ui/certd-server/src/plugins/index.ts b/packages/ui/certd-server/src/plugins/index.ts index 85e4d93a3..94caa8248 100644 --- a/packages/ui/certd-server/src/plugins/index.ts +++ b/packages/ui/certd-server/src/plugins/index.ts @@ -36,3 +36,4 @@ export * from './plugin-apisix/index.js' export * from './plugin-dokploy/index.js' export * from './plugin-godaddy/index.js' export * from './plugin-captcha/index.js' +export * from './plugin-xinnet/index.js' diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts index 79e7a2619..b2c547a2e 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/access.ts @@ -1,29 +1,67 @@ -import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline'; +import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline"; +import { XinnetClient } from "@certd/plugin-plus"; /** * 这个注解将注册一个授权配置 * 在certd的后台管理系统中,用户可以选择添加此类型的授权 */ @IsAccess({ - name: 'xinnet', - title: '新网授权', - icon: 'arcticons:dns-changer-3', - desc: '', + name: "xinnet", + title: "新网授权", + icon: "arcticons:dns-changer-3", + desc: "" }) export class XinnetAccess extends BaseAccess { + /** + * 授权属性配置 + */ @AccessInput({ - title: '域名登录密码', + title: "用户名", component: { - name:"a-input-password", - vModel:"value", - placeholder: '域名密码', + placeholder: "手机号" }, - helper:"您可以在此处[重置域名管理密码](https://domain.xinnet.com/#domain/manage/domain_manage_pwd)", required: true, - encrypt: true, + encrypt: true }) - password = ''; + username = ""; + + @AccessInput({ + title: "域名登录密码", + component: { + name: "a-input-password", + vModel: "value", + placeholder: "域名密码" + }, + helper: "您可以在此处[重置域名管理密码](https://domain.xinnet.com/#domain/manage/domain_manage_pwd)", + required: true, + encrypt: true + }) + password = ""; + + @AccessInput({ + title: "测试", + component: { + name: "api-test", + action: "TestRequest" + }, + helper: "点击测试接口是否正常" + }) + testRequest = true; + + async onTestRequest() { + + const client = new XinnetClient({ + access: this, + logger: this.ctx.logger, + http: this.ctx.http + }); + + await client.getDomainList({ pageNo: 1, pageSize: 1 }); + + return "ok"; + } + } new XinnetAccess(); diff --git a/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts index 3a9e17436..db899c717 100644 --- a/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts +++ b/packages/ui/certd-server/src/plugins/plugin-xinnet/index.ts @@ -1,3 +1,2 @@ export * from './dns-provider.js'; export * from './access.js'; -export * from './client.js'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd3f6e094..fcbe1dd38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,7 @@ importers: packages/core/acme-client: dependencies: '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../basic '@peculiar/x509': specifier: ^1.11.0 @@ -210,11 +210,11 @@ importers: packages/core/pipeline: dependencies: '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../basic '@certd/plus-core': - specifier: ^1.36.20 - version: 1.36.20 + specifier: ^1.36.21 + version: link:../../pro/plus-core dayjs: specifier: ^1.11.7 version: 1.11.13 @@ -418,7 +418,7 @@ importers: packages/libs/lib-k8s: dependencies: '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/basic '@kubernetes/client-node': specifier: 0.21.0 @@ -458,17 +458,20 @@ importers: packages/libs/lib-server: dependencies: '@certd/acme-client': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/pipeline + '@certd/plugin-lib': + specifier: ^1.36.21 + version: link:../../plugins/plugin-lib '@certd/plus-core': - specifier: ^1.36.20 - version: 1.36.20 + specifier: ^1.36.21 + version: link:../../pro/plus-core '@midwayjs/cache': specifier: ~3.14.0 version: 3.14.0 @@ -511,6 +514,9 @@ importers: mwtsc: specifier: ^1.4.0 version: 1.15.1 + sharp: + specifier: ^0.34.4 + version: 0.34.4 typeorm: specifier: ^0.3.20 version: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) @@ -610,16 +616,16 @@ importers: packages/plugins/plugin-cert: dependencies: '@certd/acme-client': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/pipeline '@certd/plugin-lib': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../plugin-lib '@google-cloud/publicca': specifier: ^1.3.0 @@ -701,10 +707,10 @@ importers: specifier: ^3.787.0 version: 3.810.0(aws-crt@1.26.2) '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/basic '@certd/pipeline': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/pipeline '@kubernetes/client-node': specifier: 0.21.0 @@ -792,19 +798,19 @@ importers: packages/pro/commercial-core: dependencies: '@certd/basic': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../core/basic '@certd/lib-server': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../libs/lib-server '@certd/pipeline': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../core/pipeline '@certd/plugin-plus': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../plugin-plus '@certd/plus-core': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../plus-core '@midwayjs/core': specifier: ~3.20.3 @@ -889,22 +895,19 @@ importers: specifier: ^1.0.2 version: 1.0.3 '@certd/basic': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../core/basic '@certd/lib-k8s': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../libs/lib-k8s '@certd/pipeline': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../core/pipeline '@certd/plugin-cert': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../plugins/plugin-cert - '@certd/plugin-lib': - specifier: ^1.36.19 - version: link:../../plugins/plugin-lib '@certd/plus-core': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../plus-core ali-oss: specifier: ^6.21.0 @@ -1007,7 +1010,7 @@ importers: packages/pro/plus-core: dependencies: '@certd/basic': - specifier: ^1.36.19 + specifier: ^1.36.21 version: link:../../core/basic dayjs: specifier: ^1.11.7 @@ -1300,10 +1303,10 @@ importers: version: 0.1.3(zod@3.24.4) devDependencies: '@certd/lib-iframe': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/lib-iframe '@certd/pipeline': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/pipeline '@rollup/plugin-commonjs': specifier: ^25.0.7 @@ -1486,47 +1489,47 @@ importers: specifier: ^3.705.0 version: 3.810.0(aws-crt@1.26.2) '@certd/acme-client': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/acme-client '@certd/basic': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/basic '@certd/commercial-core': - specifier: ^1.36.20 - version: 1.36.20(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) + specifier: ^1.36.21 + version: link:../../pro/commercial-core '@certd/cv4pve-api-javascript': specifier: ^8.4.2 version: 8.4.2 '@certd/jdcloud': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/lib-jdcloud '@certd/lib-huawei': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/lib-huawei '@certd/lib-k8s': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/lib-k8s '@certd/lib-server': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/lib-server '@certd/midway-flyway-js': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../libs/midway-flyway-js '@certd/pipeline': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../core/pipeline '@certd/plugin-cert': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../plugins/plugin-cert '@certd/plugin-lib': - specifier: ^1.36.20 + specifier: ^1.36.21 version: link:../../plugins/plugin-lib '@certd/plugin-plus': - specifier: ^1.36.20 - version: 1.36.20(encoding@0.1.13) + specifier: ^1.36.21 + version: link:../../pro/plugin-plus '@certd/plus-core': - specifier: ^1.36.20 - version: 1.36.20 + specifier: ^1.36.21 + version: link:../../pro/plus-core '@huaweicloud/huaweicloud-sdk-cdn': specifier: ^3.1.120 version: 3.1.149 @@ -1698,6 +1701,9 @@ importers: rimraf: specifier: ^5.0.5 version: 5.0.10 + sharp: + specifier: ^0.34.4 + version: 0.34.4 socks: specifier: ^2.8.3 version: 2.8.4 @@ -2769,18 +2775,9 @@ packages: '@better-scroll/zoom@2.5.1': resolution: {integrity: sha512-aGvFY5ooeZWS4RcxQLD+pGLpQHQxpPy0sMZV3yadcd2QK53PK9gS4Dp+BYfRv8lZ4/P2LoNEhr6Wq1DN6+uPlA==} - '@certd/commercial-core@1.36.20': - resolution: {integrity: sha512-5l+Kev+y8t1KVPzbTzHVEfXHJtVdBtwIIM8i7VEfui0Mnrq896d7g/kUVFsOVZ1QnPlJnT17qYX8jaP9eSzr8Q==} - '@certd/cv4pve-api-javascript@8.4.2': resolution: {integrity: sha512-udGce7ewrVl4DmZvX+17PjsnqsdDIHEDatr8QP0AVrY2p+8JkaSPW4mXCKiLGf82C9K2+GXgT+qNIqgW7tfF9Q==} - '@certd/plugin-plus@1.36.20': - resolution: {integrity: sha512-aaslvdORKbEnxWXoGHUKOlP5KlD0+OLhK9fVyPBdgu5s1cZ3tOx0lB+Bu2XXZex1fZvEQ6/qn0A9QI55UmIicA==} - - '@certd/plus-core@1.36.20': - resolution: {integrity: sha512-Ji8nsVuNNfDSsSUnL+Rm3kwXt+3WymoMq2UGVNNzJC1ywnCaLkbaBEBawHqnZJLriwt3sidtZy2PYRP6VLo5bA==} - '@certd/vue-js-cron-core@6.0.3': resolution: {integrity: sha512-kqzoAMhYz9j6FGNWEODRYtt4NpUEUwjpkU89z5WVg2tCtOcI5VhwyUGOd8AxiBCRfd6PtXvzuqw85PaOps9wrQ==} @@ -3104,6 +3101,9 @@ packages: search-insights: optional: true + '@emnapi/runtime@1.5.0': + resolution: {integrity: sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==} + '@emotion/hash@0.9.2': resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==} @@ -3526,6 +3526,132 @@ packages: peerDependencies: vue: '>=3' + '@img/colour@1.0.0': + resolution: {integrity: sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.34.4': + resolution: {integrity: sha512-sitdlPzDVyvmINUdJle3TNHl+AG9QcwiAMsXmccqsCOMZNIdW2/7S26w0LyU8euiLVzFBL3dXPwVCq/ODnf2vA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.34.4': + resolution: {integrity: sha512-rZheupWIoa3+SOdF/IcUe1ah4ZDpKBGWcsPX6MT0lYniH9micvIU7HQkYTfrx5Xi8u+YqwLtxC/3vl8TQN6rMg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.2.3': + resolution: {integrity: sha512-QzWAKo7kpHxbuHqUC28DZ9pIKpSi2ts2OJnoIGI26+HMgq92ZZ4vk8iJd4XsxN+tYfNJxzH6W62X5eTcsBymHw==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.2.3': + resolution: {integrity: sha512-Ju+g2xn1E2AKO6YBhxjj+ACcsPQRHT0bhpglxcEf+3uyPY+/gL8veniKoo96335ZaPo03bdDXMv0t+BBFAbmRA==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.2.3': + resolution: {integrity: sha512-I4RxkXU90cpufazhGPyVujYwfIm9Nk1QDEmiIsaPwdnm013F7RIceaCc87kAH+oUB1ezqEvC6ga4m7MSlqsJvQ==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.2.3': + resolution: {integrity: sha512-x1uE93lyP6wEwGvgAIV0gP6zmaL/a0tGzJs/BIDDG0zeBhMnuUPm7ptxGhUbcGs4okDJrk4nxgrmxpib9g6HpA==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-ppc64@1.2.3': + resolution: {integrity: sha512-Y2T7IsQvJLMCBM+pmPbM3bKT/yYJvVtLJGfCs4Sp95SjvnFIjynbjzsa7dY1fRJX45FTSfDksbTp6AGWudiyCg==} + cpu: [ppc64] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.2.3': + resolution: {integrity: sha512-RgWrs/gVU7f+K7P+KeHFaBAJlNkD1nIZuVXdQv6S+fNA6syCcoboNjsV2Pou7zNlVdNQoQUpQTk8SWDHUA3y/w==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.2.3': + resolution: {integrity: sha512-3JU7LmR85K6bBiRzSUc/Ff9JBVIFVvq6bomKE0e63UXGeRw2HPVEjoJke1Yx+iU4rL7/7kUjES4dZ/81Qjhyxg==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.2.3': + resolution: {integrity: sha512-F9q83RZ8yaCwENw1GieztSfj5msz7GGykG/BA+MOUefvER69K/ubgFHNeSyUu64amHIYKGDs4sRCMzXVj8sEyw==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.2.3': + resolution: {integrity: sha512-U5PUY5jbc45ANM6tSJpsgqmBF/VsL6LnxJmIf11kB7J5DctHgqm0SkuXzVWtIY90GnJxKnC/JT251TDnk1fu/g==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.34.4': + resolution: {integrity: sha512-YXU1F/mN/Wu786tl72CyJjP/Ngl8mGHN1hST4BGl+hiW5jhCnV2uRVTNOcaYPs73NeT/H8Upm3y9582JVuZHrQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.34.4': + resolution: {integrity: sha512-Xyam4mlqM0KkTHYVSuc6wXRmM7LGN0P12li03jAnZ3EJWZqj83+hi8Y9UxZUbxsgsK1qOEwg7O0Bc0LjqQVtxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-ppc64@0.34.4': + resolution: {integrity: sha512-F4PDtF4Cy8L8hXA2p3TO6s4aDt93v+LKmpcYFLAVdkkD3hSxZzee0rh6/+94FpAynsuMpLX5h+LRsSG3rIciUQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ppc64] + os: [linux] + + '@img/sharp-linux-s390x@0.34.4': + resolution: {integrity: sha512-qVrZKE9Bsnzy+myf7lFKvng6bQzhNUAYcVORq2P7bDlvmF6u2sCmK2KyEQEBdYk+u3T01pVsPrkj943T1aJAsw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.34.4': + resolution: {integrity: sha512-ZfGtcp2xS51iG79c6Vhw9CWqQC8l2Ot8dygxoDoIQPTat/Ov3qAa8qpxSrtAEAJW+UjTXc4yxCjNfxm4h6Xm2A==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.34.4': + resolution: {integrity: sha512-8hDVvW9eu4yHWnjaOOR8kHVrew1iIX+MUgwxSuH2XyYeNRtLUe4VNioSqbNkB7ZYQJj9rUTT4PyRscyk2PXFKA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.34.4': + resolution: {integrity: sha512-lU0aA5L8QTlfKjpDCEFOZsTYGn3AEiO6db8W5aQDxj0nQkVrZWmN3ZP9sYKWJdtq3PWPhUNlqehWyXpYDcI9Sg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.34.4': + resolution: {integrity: sha512-33QL6ZO/qpRyG7woB/HUALz28WnTMI2W1jgX3Nu2bypqLIKx/QKMILLJzJjI+SIbvXdG9fUnmrxR7vbi1sTBeA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-arm64@0.34.4': + resolution: {integrity: sha512-2Q250do/5WXTwxW3zjsEuMSv5sUU4Tq9VThWKlU2EYLm4MB7ZeMwF+SFJutldYODXF6jzc6YEOC+VfX0SZQPqA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.34.4': + resolution: {integrity: sha512-3ZeLue5V82dT92CNL6rsal6I2weKw1cYu+rGKm8fOCCtJTR2gYeUfY3FqUnIJsMUPIH68oS5jmZ0NiJ508YpEw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.34.4': + resolution: {integrity: sha512-xIyj4wpYs8J18sVN3mSQjwrw7fKUqRw+Z5rnHNCy5fYTxigBz81u5mOMPmFumwjcn8+ld1ppptMBCLic1nz6ig==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + '@inquirer/core@10.1.11': resolution: {integrity: sha512-BXwI/MCqdtAhzNQlBEFE7CEflhPkl/BqvAuV/aK6lW3DClIfYVDWPP/kXuXHtBWC7/EEbNqd/1BGq2BGBBnuxw==} engines: {node: '>=18'} @@ -7120,6 +7246,10 @@ packages: resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} engines: {node: '>=8'} + detect-libc@2.1.0: + resolution: {integrity: sha512-vEtk+OcP7VBRtQZ1EJ3bdgzSfBjgnEalLTp5zjJrS+2Z1w2KZly4SBdac/WDU3hhsNAZ9E8SC96ME4Ey8MZ7cg==} + engines: {node: '>=8'} + devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} @@ -11680,6 +11810,10 @@ packages: shallow-equal@1.2.1: resolution: {integrity: sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==} + sharp@0.34.4: + resolution: {integrity: sha512-FUH39xp3SBPnxWvd5iib1X8XY7J0K0X7d93sie9CJg2PO8/7gmg89Nve6OjItK53/MlAushNNxteBYfM6DEuoA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -12135,12 +12269,12 @@ packages: superagent@8.0.6: resolution: {integrity: sha512-HqSe6DSIh3hEn6cJvCkaM1BLi466f1LHi4yubR0tpewlMpk4RUFFy35bKz8SsPBwYfIIJy5eclp+3tCYAuX0bw==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net superagent@8.1.2: resolution: {integrity: sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net superjson@2.2.2: resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==} @@ -12149,6 +12283,7 @@ packages: supertest@6.3.3: resolution: {integrity: sha512-EMCG6G8gDu5qEqRQ3JjjPs6+FYT1a7Hv5ApHvtSghmOFJYtsU5S+pSb6Y2EUeCEY3CmEL3mmQ8YWlPOzQomabA==} engines: {node: '>=6.4.0'} + deprecated: Please upgrade to supertest v7.1.3+, see release notes at https://github.com/forwardemail/supertest/releases/tag/v7.1.3 - maintenance is supported by Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} @@ -15475,84 +15610,12 @@ snapshots: dependencies: '@better-scroll/core': 2.5.1 - '@certd/commercial-core@1.36.20(better-sqlite3@11.10.0)(encoding@0.1.13)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3))': - dependencies: - '@certd/basic': link:packages/core/basic - '@certd/lib-server': link:packages/libs/lib-server - '@certd/pipeline': link:packages/core/pipeline - '@certd/plugin-plus': 1.36.20(encoding@0.1.13) - '@certd/plus-core': 1.36.20 - '@midwayjs/core': 3.20.4 - '@midwayjs/koa': 3.20.5 - '@midwayjs/logger': 3.4.2 - '@midwayjs/typeorm': 3.20.4 - alipay-sdk: 4.14.0 - dayjs: 1.11.13 - typeorm: 0.3.24(better-sqlite3@11.10.0)(mysql2@3.14.1)(pg@8.16.0)(reflect-metadata@0.2.2)(ts-node@10.9.2(@types/node@18.19.100)(typescript@5.8.3)) - wechatpay-node-v3: 2.2.1 - transitivePeerDependencies: - - '@google-cloud/spanner' - - '@sap/hana-client' - - babel-plugin-macros - - better-sqlite3 - - encoding - - hdb-pool - - ioredis - - mongodb - - mssql - - mysql2 - - oracledb - - pg - - pg-native - - pg-query-stream - - proxy-agent - - redis - - reflect-metadata - - sql.js - - sqlite3 - - supports-color - - ts-node - - typeorm-aurora-data-api-driver - '@certd/cv4pve-api-javascript@8.4.2': dependencies: debug: 4.4.1(supports-color@8.1.1) transitivePeerDependencies: - supports-color - '@certd/plugin-plus@1.36.20(encoding@0.1.13)': - dependencies: - '@alicloud/pop-core': 1.8.0 - '@baiducloud/sdk': 1.0.3 - '@certd/basic': link:packages/core/basic - '@certd/lib-k8s': link:packages/libs/lib-k8s - '@certd/pipeline': link:packages/core/pipeline - '@certd/plugin-cert': link:packages/plugins/plugin-cert - '@certd/plugin-lib': link:packages/plugins/plugin-lib - '@certd/plus-core': 1.36.20 - ali-oss: 6.23.0 - baidu-aip-sdk: 4.16.16 - basic-ftp: 5.0.5 - cos-nodejs-sdk-v5: 2.14.7 - crypto-js: 4.2.0 - dayjs: 1.11.13 - form-data: 4.0.2 - https-proxy-agent: 7.0.6 - js-yaml: 4.1.0 - jsencrypt: 3.3.2 - jsrsasign: 11.1.0 - qiniu: 7.14.0 - tencentcloud-sdk-nodejs: 4.1.112(encoding@0.1.13) - transitivePeerDependencies: - - encoding - - proxy-agent - - supports-color - - '@certd/plus-core@1.36.20': - dependencies: - '@certd/basic': link:packages/core/basic - dayjs: 1.11.13 - '@certd/vue-js-cron-core@6.0.3': dependencies: mustache: 4.2.0 @@ -15874,6 +15937,11 @@ snapshots: transitivePeerDependencies: - '@algolia/client-search' + '@emnapi/runtime@1.5.0': + dependencies: + tslib: 2.8.1 + optional: true + '@emotion/hash@0.9.2': {} '@emotion/unitless@0.8.1': {} @@ -16246,6 +16314,94 @@ snapshots: '@iconify/types': 2.0.0 vue: 3.5.14(typescript@5.8.3) + '@img/colour@1.0.0': {} + + '@img/sharp-darwin-arm64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.2.3 + optional: true + + '@img/sharp-darwin-x64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.2.3 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.2.3': + optional: true + + '@img/sharp-libvips-darwin-x64@1.2.3': + optional: true + + '@img/sharp-libvips-linux-arm64@1.2.3': + optional: true + + '@img/sharp-libvips-linux-arm@1.2.3': + optional: true + + '@img/sharp-libvips-linux-ppc64@1.2.3': + optional: true + + '@img/sharp-libvips-linux-s390x@1.2.3': + optional: true + + '@img/sharp-libvips-linux-x64@1.2.3': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.2.3': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.2.3': + optional: true + + '@img/sharp-linux-arm64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.2.3 + optional: true + + '@img/sharp-linux-arm@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.2.3 + optional: true + + '@img/sharp-linux-ppc64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.2.3 + optional: true + + '@img/sharp-linux-s390x@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.2.3 + optional: true + + '@img/sharp-linux-x64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.2.3 + optional: true + + '@img/sharp-linuxmusl-arm64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.2.3 + optional: true + + '@img/sharp-linuxmusl-x64@0.34.4': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.2.3 + optional: true + + '@img/sharp-wasm32@0.34.4': + dependencies: + '@emnapi/runtime': 1.5.0 + optional: true + + '@img/sharp-win32-arm64@0.34.4': + optional: true + + '@img/sharp-win32-ia32@0.34.4': + optional: true + + '@img/sharp-win32-x64@0.34.4': + optional: true + '@inquirer/core@10.1.11(@types/node@22.15.18)': dependencies: '@inquirer/figures': 1.0.11 @@ -21108,6 +21264,8 @@ snapshots: detect-libc@2.0.4: {} + detect-libc@2.1.0: {} + devlop@1.1.0: dependencies: dequal: 2.0.3 @@ -21644,13 +21802,13 @@ snapshots: resolve: 1.22.10 semver: 6.3.1 - eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8): + eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8): dependencies: eslint: 7.32.0 prettier: 2.8.8 prettier-linter-helpers: 1.0.0 optionalDependencies: - eslint-config-prettier: 8.10.0(eslint@8.57.0) + eslint-config-prettier: 8.10.0(eslint@7.32.0) eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@8.57.0)(prettier@2.8.8): dependencies: @@ -24358,7 +24516,7 @@ snapshots: eslint: 7.32.0 eslint-config-prettier: 8.10.0(eslint@7.32.0) eslint-plugin-node: 11.1.0(eslint@7.32.0) - eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8) + eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8) execa: 5.1.1 inquirer: 7.3.3 json5: 2.2.3 @@ -26388,6 +26546,35 @@ snapshots: shallow-equal@1.2.1: {} + sharp@0.34.4: + dependencies: + '@img/colour': 1.0.0 + detect-libc: 2.1.0 + semver: 7.7.2 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.34.4 + '@img/sharp-darwin-x64': 0.34.4 + '@img/sharp-libvips-darwin-arm64': 1.2.3 + '@img/sharp-libvips-darwin-x64': 1.2.3 + '@img/sharp-libvips-linux-arm': 1.2.3 + '@img/sharp-libvips-linux-arm64': 1.2.3 + '@img/sharp-libvips-linux-ppc64': 1.2.3 + '@img/sharp-libvips-linux-s390x': 1.2.3 + '@img/sharp-libvips-linux-x64': 1.2.3 + '@img/sharp-libvips-linuxmusl-arm64': 1.2.3 + '@img/sharp-libvips-linuxmusl-x64': 1.2.3 + '@img/sharp-linux-arm': 0.34.4 + '@img/sharp-linux-arm64': 0.34.4 + '@img/sharp-linux-ppc64': 0.34.4 + '@img/sharp-linux-s390x': 0.34.4 + '@img/sharp-linux-x64': 0.34.4 + '@img/sharp-linuxmusl-arm64': 0.34.4 + '@img/sharp-linuxmusl-x64': 0.34.4 + '@img/sharp-wasm32': 0.34.4 + '@img/sharp-win32-arm64': 0.34.4 + '@img/sharp-win32-ia32': 0.34.4 + '@img/sharp-win32-x64': 0.34.4 + shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 From 2c1600ddfb3ccaff6d925648b9719ca258058446 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 23 Sep 2025 23:27:36 +0800 Subject: [PATCH 06/95] =?UTF-8?q?chore:=20=E6=96=B0=E7=BD=91dns=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/system/basic/service/ocr-service.ts | 24 +++++++++++++++++++ .../src/system/basic/service/plus-service.ts | 2 +- packages/plugins/plugin-lib/src/index.ts | 1 + packages/plugins/plugin-lib/src/lib/index.ts | 1 + .../plugins/plugin-lib/src/lib/ocr-api.ts | 3 +++ 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 packages/libs/lib-server/src/system/basic/service/ocr-service.ts create mode 100644 packages/plugins/plugin-lib/src/lib/index.ts create mode 100644 packages/plugins/plugin-lib/src/lib/ocr-api.ts diff --git a/packages/libs/lib-server/src/system/basic/service/ocr-service.ts b/packages/libs/lib-server/src/system/basic/service/ocr-service.ts new file mode 100644 index 000000000..19558c99f --- /dev/null +++ b/packages/libs/lib-server/src/system/basic/service/ocr-service.ts @@ -0,0 +1,24 @@ +import { Inject, Provide, Scope, ScopeEnum } from "@midwayjs/core"; +import { PlusService } from "./plus-service.js"; +import { IOcrService } from "@certd/plugin-lib"; + +/** + */ +@Provide("ocrService") +@Scope(ScopeEnum.Request, { allowDowngrade: true }) +export class OcrService implements IOcrService { + @Inject() + plusService: PlusService; + + async doOcrFromImage(opts: { image: string }): Promise<{ texts: string[] }> { + const res = await this.plusService.requestWithToken({ + url: "/activation/certd/ocr", + method: "post", + data: { + image: opts.image + } + }); + return res; + } + +} diff --git a/packages/libs/lib-server/src/system/basic/service/plus-service.ts b/packages/libs/lib-server/src/system/basic/service/plus-service.ts index 7472228fc..2b54833a7 100644 --- a/packages/libs/lib-server/src/system/basic/service/plus-service.ts +++ b/packages/libs/lib-server/src/system/basic/service/plus-service.ts @@ -4,7 +4,7 @@ import { cache, http, HttpRequestConfig, logger } from '@certd/basic'; import { SysInstallInfo, SysLicenseInfo, SysSettingsService } from '../../settings/index.js'; import { merge } from 'lodash-es'; -@Provide() +@Provide("plusService") @Scope(ScopeEnum.Request, { allowDowngrade: true }) export class PlusService { @Inject() diff --git a/packages/plugins/plugin-lib/src/index.ts b/packages/plugins/plugin-lib/src/index.ts index ab1d48c10..00f11d4bc 100644 --- a/packages/plugins/plugin-lib/src/index.ts +++ b/packages/plugins/plugin-lib/src/index.ts @@ -7,3 +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"; diff --git a/packages/plugins/plugin-lib/src/lib/index.ts b/packages/plugins/plugin-lib/src/lib/index.ts new file mode 100644 index 000000000..d66827933 --- /dev/null +++ b/packages/plugins/plugin-lib/src/lib/index.ts @@ -0,0 +1 @@ +export * from "./ocr-api.js"; diff --git a/packages/plugins/plugin-lib/src/lib/ocr-api.ts b/packages/plugins/plugin-lib/src/lib/ocr-api.ts new file mode 100644 index 000000000..5d972a08b --- /dev/null +++ b/packages/plugins/plugin-lib/src/lib/ocr-api.ts @@ -0,0 +1,3 @@ +export interface IOcrService { + doOcrFromImage(opts: { image: string }): Promise<{ texts: string[] }>; +} From 1c15beadc7fe8a7c6ec1903b7e722ca2f52e05b3 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 24 Sep 2025 00:06:00 +0800 Subject: [PATCH 07/95] =?UTF-8?q?perf:=20=E7=99=BB=E5=BD=95=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E6=97=B6=E6=B8=85=E9=99=A4=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/captcha/captcha-input.vue | 16 ++++- .../captcha/captchas/geetest_captcha.vue | 58 ++++++++++++++----- .../captcha/captchas/image_captcha.vue | 17 +++++- .../views/framework/forgot-password/index.vue | 45 +++++++++----- .../src/views/framework/login/index.vue | 16 +---- .../src/views/framework/login/sms-code.vue | 5 +- .../views/framework/register/email-code.vue | 5 +- .../src/views/framework/register/index.vue | 26 +++++---- 8 files changed, 130 insertions(+), 58 deletions(-) diff --git a/packages/ui/certd-client/src/components/captcha/captcha-input.vue b/packages/ui/certd-client/src/components/captcha/captcha-input.vue index 3a348c332..ca84f252a 100644 --- a/packages/ui/certd-client/src/components/captcha/captcha-input.vue +++ b/packages/ui/certd-client/src/components/captcha/captcha-input.vue @@ -1,5 +1,5 @@ diff --git a/packages/ui/certd-client/src/components/captcha/captchas/geetest_captcha.vue b/packages/ui/certd-client/src/components/captcha/captchas/geetest_captcha.vue index 926b9da96..a5909ecef 100644 --- a/packages/ui/certd-client/src/components/captcha/captchas/geetest_captcha.vue +++ b/packages/ui/certd-client/src/components/captcha/captchas/geetest_captcha.vue @@ -2,7 +2,7 @@
+ diff --git a/packages/ui/certd-client/src/components/captcha/captchas/tencent_captcha.vue b/packages/ui/certd-client/src/components/captcha/captchas/tencent_captcha.vue new file mode 100644 index 000000000..88f06e177 --- /dev/null +++ b/packages/ui/certd-client/src/components/captcha/captchas/tencent_captcha.vue @@ -0,0 +1,208 @@ + + + diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts index 01ffa5ecf..74ab87abb 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/api.ts @@ -45,6 +45,16 @@ export async function DoVerify(id: number) { }); } +export async function ResetStatus(id: number) { + return await request({ + url: apiPrefix + "/resetStatus", + method: "post", + data: { + id, + }, + }); +} + export async function ParseDomain(fullDomain: string) { return await request({ url: subDomainApiPrefix + "/parseDomain", diff --git a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue index ebee7a678..9dac4178a 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/cname-record-info.vue @@ -16,6 +16,9 @@ + + +