mirror of
https://github.com/certd/certd.git
synced 2026-05-14 03:57:30 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb46f8c776 | |||
| bd511f97cb | |||
| 560bf40e4b | |||
| 4f4652c1cd | |||
| 60e13c2a1d | |||
| 1fe0dc4d16 | |||
| 181a1e3c0a | |||
| 6bba771856 | |||
| 921f1f42fb |
@@ -3,6 +3,21 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.38.5](https://github.com/certd/certd/compare/v1.38.4...v1.38.5) (2026-02-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 阿里云esa查询证书限制接口无效,改成配置证书数量上限检查方式进行清理 ([2302567](https://github.com/certd/certd/commit/230256793f8ad87ef8a0738c37108bf7b5ab9853))
|
||||
* 某些情况下登陆页面没有显示重置密码文档链接的问题 ([40801d0](https://github.com/certd/certd/commit/40801d0a0668c77adb57fae42b4b6615b198a88d))
|
||||
* 修复部署到火山引擎vod,获取域名列表为空的bug ([0719f4c](https://github.com/certd/certd/commit/0719f4c99e9198544d03431107b53652e076e881))
|
||||
* 修复litessl new-nonce报428的bug ([540ef96](https://github.com/certd/certd/commit/540ef967457a7871637cfdb5012ed1fa3261757b))
|
||||
* 修复oidc配置取消后获取登出地址失败后无法列出oauth列表的bug ([eb5de15](https://github.com/certd/certd/commit/eb5de150332fd914c56b812c3ba2c2445f902bb7))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 将重置密码的日志挪到启动成功之后,方便查看 ([0fa9b34](https://github.com/certd/certd/commit/0fa9b344e08cf355aee7a7566f061cc5d95dc374))
|
||||
* 支持绑定两个url地址 ([a2e9a41](https://github.com/certd/certd/commit/a2e9a41a7e712395c0e3ee6fe55b370aa1fc1f12))
|
||||
|
||||
## [1.38.4](https://github.com/certd/certd/compare/v1.38.3...v1.38.4) (2026-01-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"notice": "永久专业版上线,新用户立减50,升级到最新版点击下方“立即赞助”按钮前往获取",
|
||||
"plus": {
|
||||
"name": "专业版",
|
||||
"price": "89.9",
|
||||
"price3": "199",
|
||||
"tooltip": "开源需要您的赞助支持",
|
||||
"priceText":"¥89.9/年",
|
||||
"discountText":"永久专业版50优惠券立即领取"
|
||||
},
|
||||
"comm": {
|
||||
"name": "商业版",
|
||||
"price": "399",
|
||||
"price3": "899",
|
||||
"tooltip": "3年优惠300",
|
||||
"priceText":"¥399/年",
|
||||
"discountText":"¥899/3年(3年优惠300)"
|
||||
},
|
||||
"app":{
|
||||
"minVersion":"1.36.0",
|
||||
"minVersionTip":"版本过低,为了您的数据安全,请尽快升级"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,3 +52,11 @@ service:
|
||||
3. DNS 有其他平台申请过的_acme-challenge记录,删除即可
|
||||
|
||||
|
||||
## 7. DNS problem: NXDOMAIN looking up TXT for _acme-challenge.xxx
|
||||
`
|
||||
DNS problem: NXDOMAIN looking up TXT for _acme-challenge.xxxxx - check that a DNS record exists for this domain
|
||||
`
|
||||
证书颁发机构向域名ns查询TXT验证记录失败,有以下几种可能
|
||||
1、域名的ns服务器修改成别的了,但申请证书时的DNS提供商选择错误(检查确认,配置正确的DNS提供商)
|
||||
2、证书颁发机构与ns域名服务器之间访问不通,无法查询到TXT记录(尝试更换证书颁发机构)
|
||||
3、ns服务商解析值生效慢(尝试修改证书申请任务里面的等待生效时长600-1000s)
|
||||
@@ -70,5 +70,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -47,5 +47,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -45,5 +45,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
"prettier": "^2.8.8",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -56,5 +56,5 @@
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -64,5 +64,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -65,6 +65,8 @@ export class SysPublicSettings extends BaseSettings {
|
||||
}> = {};
|
||||
|
||||
notice?: string;
|
||||
|
||||
adminMode?: "enterprise" | "saas" = "saas";
|
||||
}
|
||||
|
||||
export class SysPrivateSettings extends BaseSettings {
|
||||
|
||||
@@ -21,6 +21,9 @@ export class AccessEntity {
|
||||
@Column({ name: 'encrypt_setting', comment: '已加密设置', length: 10240, nullable: true })
|
||||
encryptSetting: string;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -28,6 +28,9 @@ export class AddonEntity {
|
||||
@Column({ name: 'is_default', comment: '是否默认', nullable: false, default: false })
|
||||
isDefault: boolean;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -38,5 +38,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -57,5 +57,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "84291482732687cc8162c6505666ba2b29b02918"
|
||||
"gitHead": "eeb1f27fa47ddc616451f3e5a8fb8d1de345d252"
|
||||
}
|
||||
|
||||
@@ -861,4 +861,8 @@ export default {
|
||||
select: "Select",
|
||||
placeholder: "select please",
|
||||
},
|
||||
adminMode: {
|
||||
enterpriseMode: "Enterprise Mode",
|
||||
saasMode: "SaaS Mode",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
},
|
||||
customPipeline: "自定义流水线",
|
||||
createCertdPipeline: "创建证书流水线",
|
||||
commercialCertHosting: "商用证书托管",
|
||||
commercialCertHosting: "已有证书托管",
|
||||
tooltip: {
|
||||
manualUploadOwnCert: "手动上传自有证书,执行自动部署",
|
||||
noAutoApplyCommercialCert: "并不能自动申请商业证书",
|
||||
@@ -876,4 +876,8 @@ export default {
|
||||
select: "选择",
|
||||
placeholder: "请选择",
|
||||
},
|
||||
adminMode: {
|
||||
enterpriseMode: "企业模式",
|
||||
saasMode: "SaaS模式",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -86,6 +86,9 @@ export type SysPublicSetting = {
|
||||
>;
|
||||
// 系统通知
|
||||
notice?: string;
|
||||
|
||||
// 管理员模式
|
||||
adminMode?: "enterprise" | "saas";
|
||||
};
|
||||
export type SuiteSetting = {
|
||||
enabled?: boolean;
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
<a-tab-pane key="pipeline" :tab="t('certd.sys.setting.pipelineSetting')">
|
||||
<SettingPipeline v-if="activeKey === 'pipeline'" />
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="mode" :tab="t('certd.adminMode')">
|
||||
<SettingMode v-if="activeKey === 'mode'" />
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</fs-page>
|
||||
@@ -39,6 +42,8 @@ import SettingSafe from "/@/views/sys/settings/tabs/safe.vue";
|
||||
import SettingCaptcha from "/@/views/sys/settings/tabs/captcha.vue";
|
||||
import SettingPipeline from "/@/views/sys/settings/tabs/pipeline.vue";
|
||||
import SettingOauth from "/@/views/sys/settings/tabs/oauth.vue";
|
||||
import SettingMode from "/@/views/sys/settings/tabs/mode.vue";
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { ref } from "vue";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
<a-select-option value="ipv4first">{{ t("certd.ipv4Priority") }}</a-select-option>
|
||||
<a-select-option value="ipv6first">{{ t("certd.ipv6Priority") }}</a-select-option>
|
||||
</a-select>
|
||||
<div class="helper">{{ t("certd.dualStackNetworkHelper") }}, <a href="https://certd.docmirror.cn/guide/use/setting/ipv6.html" target="_blank">{{ t("certd.helpDocLink") }}</a></div>
|
||||
<div class="helper">
|
||||
{{ t("certd.dualStackNetworkHelper") }}, <a href="https://certd.docmirror.cn/guide/use/setting/ipv6.html" target="_blank">{{ t("certd.helpDocLink") }}</a>
|
||||
</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item :label="t('certd.sys.setting.showRunStrategy')" :name="['public', 'showRunStrategy']">
|
||||
@@ -68,8 +70,6 @@ import { useSettingStore } from "/@/store/settings";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { util } from "/@/utils";
|
||||
import { useI18n } from "/src/locales";
|
||||
import AddonSelector from "../../../certd/addon/addon-selector/index.vue";
|
||||
import CaptchaInput from "/@/components/captcha/captcha-input.vue";
|
||||
const { t } = useI18n();
|
||||
|
||||
defineOptions({
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div class="sys-settings-form sys-settings-mode">
|
||||
<a-form :model="formState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onFinish">
|
||||
<a-form-item :label="t('certd.adminMode')" :name="['public', 'adminMode']">
|
||||
<fs-dict-radio v-model:checked="formState.public.adminMode" :dict="adminModeDict" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
|
||||
<a-button :loading="saveLoading" type="primary" html-type="submit">{{ t("certd.saveButton") }}</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import { reactive, ref } from "vue";
|
||||
import { SysSettings } from "/@/views/sys/settings/api";
|
||||
import * as api from "/@/views/sys/settings/api";
|
||||
import { merge } from "lodash-es";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { useI18n } from "/src/locales";
|
||||
const { t } = useI18n();
|
||||
|
||||
defineOptions({
|
||||
name: "SettingMode",
|
||||
});
|
||||
|
||||
const adminModeDict = [
|
||||
{
|
||||
label: t("certd.adminMode.enterpriseMode"),
|
||||
value: "enterprise",
|
||||
},
|
||||
{
|
||||
label: t("certd.adminMode.saasMode"),
|
||||
value: "saas",
|
||||
},
|
||||
];
|
||||
|
||||
const formState = reactive<Partial<SysSettings>>({
|
||||
public: {},
|
||||
private: {},
|
||||
});
|
||||
|
||||
async function loadSysSettings() {
|
||||
const data: any = await api.SysSettingsGet();
|
||||
merge(formState, data);
|
||||
}
|
||||
|
||||
const saveLoading = ref(false);
|
||||
loadSysSettings();
|
||||
const settingsStore = useSettingStore();
|
||||
const onFinish = async (form: any) => {
|
||||
try {
|
||||
saveLoading.value = true;
|
||||
|
||||
await api.SysSettingsSave(form);
|
||||
await settingsStore.loadSysSettings();
|
||||
notification.success({
|
||||
message: t("certd.saveSuccess"),
|
||||
});
|
||||
} finally {
|
||||
saveLoading.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less"></style>
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
CREATE TABLE "cd_project"
|
||||
(
|
||||
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
"user_id" integer NOT NULL,
|
||||
"name" varchar(512) NOT NULL,
|
||||
"disabled" boolean NOT NULL DEFAULT (false),
|
||||
"create_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP),
|
||||
"update_time" datetime NOT NULL DEFAULT (CURRENT_TIMESTAMP)
|
||||
);
|
||||
|
||||
|
||||
CREATE INDEX "index_project_user_id" ON "cd_project" ("user_id");
|
||||
INSERT INTO cd_project (id, user_id, "name", "disabled") VALUES (1, 0, 'default', false);
|
||||
|
||||
|
||||
ALTER TABLE cd_cert_info ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_cert_project_id" ON "cd_cert_info" ("project_id");
|
||||
|
||||
ALTER TABLE cd_site_info ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_site_project_id" ON "cd_site_info" ("project_id");
|
||||
|
||||
ALTER TABLE cd_site_ip ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_site_ip_project_id" ON "cd_site_ip" ("project_id");
|
||||
|
||||
ALTER TABLE cd_open_key ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_open_key_project_id" ON "cd_open_key" ("project_id");
|
||||
|
||||
ALTER TABLE cd_access ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_access_project_id" ON "cd_access" ("project_id");
|
||||
|
||||
ALTER TABLE cd_addon ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_addon_project_id" ON "cd_addon" ("project_id");
|
||||
|
||||
ALTER TABLE pi_pipeline ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_pipeline_project_id" ON "cd_pipeline" ("project_id");
|
||||
|
||||
ALTER TABLE pi_pipeline_group ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_pipeline_group_project_id" ON "cd_pipeline_group" ("project_id");
|
||||
|
||||
ALTER TABLE pi_storage ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_storage_project_id" ON "cd_storage" ("project_id");
|
||||
|
||||
ALTER TABLE pi_notification ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_notification_project_id" ON "cd_notification" ("project_id");
|
||||
|
||||
ALTER TABLE pi_history ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_history_project_id" ON "cd_history" ("project_id");
|
||||
|
||||
ALTER TABLE pi_history_log ADD COLUMN project_id integer;
|
||||
CREATE INDEX "index_history_log_project_id" ON "cd_history_log" ("project_id");
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ default:
|
||||
runStrategy: 0
|
||||
name: CertApplyUpload
|
||||
icon: ph:certificate
|
||||
title: 商用证书托管
|
||||
title: 已有证书托管
|
||||
group: cert
|
||||
desc: 手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次)
|
||||
shortcut:
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Application } from '@midwayjs/koa';
|
||||
import { httpsServer, HttpsServerOptions } from './https/server.js';
|
||||
import { UserService } from '../sys/authority/service/user-service.js';
|
||||
import { UserSettingsService } from '../mine/service/user-settings-service.js';
|
||||
import { startProxyServer } from './proxy/server.js';
|
||||
|
||||
@Autoload()
|
||||
@Scope(ScopeEnum.Request, { allowDowngrade: true })
|
||||
@@ -37,6 +38,7 @@ export class AutoZPrint {
|
||||
async init() {
|
||||
//监听https
|
||||
this.startHttpsServer();
|
||||
// this.startProxyServer();
|
||||
logger.info("ENV:", process.env.NODE_ENV);
|
||||
if (isDev()) {
|
||||
this.startHeapLog();
|
||||
@@ -97,4 +99,8 @@ export class AutoZPrint {
|
||||
hostname: this.httpsConfig.hostname || this.koaConfig.hostname,
|
||||
});
|
||||
}
|
||||
|
||||
startProxyServer() {
|
||||
startProxyServer({port: 7003});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// proxy-server.js
|
||||
import http from 'http';
|
||||
import https from 'https';
|
||||
import url from 'url';
|
||||
import net from 'net';
|
||||
import { logger } from '@certd/basic';
|
||||
|
||||
|
||||
export function startProxyServer(opts:{port:number}) {
|
||||
const {port} = opts;
|
||||
|
||||
// 创建 HTTP 代理服务器
|
||||
const proxyServer = http.createServer((clientReq, clientRes) => {
|
||||
logger.log(`[proxy] 收到请求: ${clientReq.method} ${clientReq.url}`);
|
||||
|
||||
// 解析请求的 URL
|
||||
const parsedUrl = url.parse(clientReq.url);
|
||||
const options = {
|
||||
hostname: parsedUrl.hostname,
|
||||
port: parsedUrl.port || (parsedUrl.protocol === 'https:' ? 443 : 80),
|
||||
path: parsedUrl.path,
|
||||
method: clientReq.method,
|
||||
headers: clientReq.headers
|
||||
};
|
||||
|
||||
// 根据协议选择不同的模块
|
||||
const protocol = parsedUrl.protocol === 'https:' ? https : http;
|
||||
|
||||
// 移除可能会引起问题的 headers
|
||||
delete options.headers['proxy-connection'];
|
||||
delete options.headers['connection'];
|
||||
delete options.headers['keep-alive'];
|
||||
|
||||
// 创建到目标服务器的请求
|
||||
const proxyReq = protocol.request(options, (proxyRes) => {
|
||||
// 将目标服务器的响应返回给客户端
|
||||
clientRes.writeHead(proxyRes.statusCode, proxyRes.headers);
|
||||
proxyRes.pipe(clientRes);
|
||||
});
|
||||
|
||||
proxyReq.on('error', (err) => {
|
||||
logger.error('[proxy] 代理请求错误:', err);
|
||||
clientRes.writeHead(500);
|
||||
clientRes.end('代理服务器错误');
|
||||
});
|
||||
|
||||
// 将客户端请求体转发到目标服务器
|
||||
clientReq.pipe(proxyReq);
|
||||
});
|
||||
|
||||
// 处理 CONNECT 方法(HTTPS 代理)
|
||||
proxyServer.on('connect', (req, clientSocket, head) => {
|
||||
logger.log(`[proxy] HTTPS 连接请求: ${req.url}`);
|
||||
|
||||
const [hostname, port] = req.url.split(':');
|
||||
const portNum = parseInt(port) || 443;
|
||||
|
||||
// 连接到目标服务器
|
||||
const serverSocket = net.connect(portNum, hostname, () => {
|
||||
// 告诉客户端连接已建立
|
||||
clientSocket.write('HTTP/1.1 200 Connection Established\r\n' +
|
||||
'Proxy-agent: Node.js-Proxy\r\n' +
|
||||
'\r\n');
|
||||
|
||||
// 建立双向数据流
|
||||
serverSocket.write(head);
|
||||
serverSocket.pipe(clientSocket);
|
||||
clientSocket.pipe(serverSocket);
|
||||
});
|
||||
|
||||
serverSocket.on('error', (err) => {
|
||||
logger.error('[proxy] HTTPS 代理错误:', err);
|
||||
clientSocket.end();
|
||||
});
|
||||
|
||||
clientSocket.on('error', (err) => {
|
||||
logger.error('[proxy] 客户端 socket 错误:', err);
|
||||
serverSocket.end();
|
||||
});
|
||||
});
|
||||
|
||||
// 监听端口
|
||||
proxyServer.listen(port, () => {
|
||||
logger.info(`[proxy] 正向代理服务器运行在 http://0.0.0.0:${port}`);
|
||||
});
|
||||
|
||||
return proxyServer
|
||||
}
|
||||
@@ -42,6 +42,9 @@ export class CertInfoEntity {
|
||||
@Column({ name: 'cert_file', comment: '证书下载' })
|
||||
certFile: string;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -71,6 +71,9 @@ export class SiteInfoEntity {
|
||||
@Column({ name: 'group_id', comment: '分组id' })
|
||||
groupId: number;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({ name: 'create_time', comment: '创建时间', default: () => 'CURRENT_TIMESTAMP' })
|
||||
createTime: Date;
|
||||
@Column({ name: 'update_time', comment: '修改时间', default: () => 'CURRENT_TIMESTAMP' })
|
||||
|
||||
@@ -33,6 +33,8 @@ export class SiteIpEntity {
|
||||
remark: string;
|
||||
@Column({ name: "disabled", comment: "禁用启用" })
|
||||
disabled: boolean;
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({ name: 'create_time', comment: '创建时间', default: () => 'CURRENT_TIMESTAMP' })
|
||||
createTime: Date;
|
||||
|
||||
@@ -17,6 +17,9 @@ export class OpenKeyEntity {
|
||||
@Column({ name: 'scope', comment: '权限范围' })
|
||||
scope: string; // open 仅开放接口、 user 用户所有权限
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({ name: 'create_time', comment: '创建时间', default: () => 'CURRENT_TIMESTAMP' })
|
||||
createTime: Date;
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ export class HistoryLogEntity {
|
||||
@Column({ comment: '日志内容', length: 40960, nullable: true })
|
||||
logs: string;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -26,6 +26,9 @@ export class HistoryEntity {
|
||||
})
|
||||
endTime: Date;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
@@ -38,6 +41,7 @@ export class HistoryEntity {
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
updateTime: Date;
|
||||
|
||||
|
||||
pipelineTitle: string;
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ export class NotificationEntity {
|
||||
@Column({ name: 'is_default', comment: '是否默认' })
|
||||
isDefault: boolean;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -17,6 +17,9 @@ export class PipelineGroupEntity {
|
||||
@Column({ name: 'favorite', comment: '收藏' })
|
||||
favorite: boolean;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -61,6 +61,9 @@ export class PipelineEntity {
|
||||
@Column({name: 'order', comment: '排序', nullable: true,})
|
||||
order: number;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({name: 'create_time',comment: '创建时间', default: () => 'CURRENT_TIMESTAMP',})
|
||||
createTime: Date;
|
||||
@Column({
|
||||
|
||||
@@ -23,6 +23,9 @@ export class StorageEntity {
|
||||
@Column({ comment: 'value', length: 40960, nullable: true })
|
||||
value: string;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -39,6 +39,9 @@ export class TemplateEntity {
|
||||
})
|
||||
order: number;
|
||||
|
||||
@Column({ name: 'project_id', comment: '项目id' })
|
||||
projectId: number;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
/**
|
||||
*/
|
||||
@Entity('cd_audit_log')
|
||||
export class AuditLogEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ name: 'user_id', comment: 'UserId' })
|
||||
userId: number;
|
||||
|
||||
@Column({ name: 'user_name', comment: '用户名' })
|
||||
userName: string;
|
||||
|
||||
@Column({ name: 'project_id', comment: 'ProjectId' })
|
||||
projectId: number;
|
||||
|
||||
@Column({ name: 'project_name', comment: '项目名称' })
|
||||
projectName: string;
|
||||
|
||||
@Column({ name: 'action', comment: '操作' })
|
||||
action: string;
|
||||
|
||||
@Column({ name: 'content', comment: '内容' })
|
||||
content: string;
|
||||
|
||||
@Column({ name: 'ip_address', comment: 'IP地址' })
|
||||
ipAddress: string;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
createTime: Date;
|
||||
@Column({
|
||||
name: 'update_time',
|
||||
comment: '修改时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
updateTime: Date;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
/**
|
||||
*/
|
||||
@Entity('cd_project_user')
|
||||
export class ProjectUserEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ name: 'user_id', comment: 'UserId' })
|
||||
userId: number;
|
||||
|
||||
@Column({ name: 'project_id', comment: 'ProjectId' })
|
||||
projectId: number;
|
||||
|
||||
@Column({ name: 'permission', comment: '权限' })
|
||||
permission: string; // read / write
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
createTime: Date;
|
||||
@Column({
|
||||
name: 'update_time',
|
||||
comment: '修改时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
updateTime: Date;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
/**
|
||||
*/
|
||||
@Entity('cd_project')
|
||||
export class ProjectEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ name: 'user_id', comment: 'UserId' })
|
||||
userId: number;
|
||||
|
||||
@Column({ name: 'name', comment: '项目名称' })
|
||||
name: string;
|
||||
|
||||
@Column({ name: 'disabled', comment: '禁用' })
|
||||
disabled: boolean;
|
||||
|
||||
@Column({
|
||||
name: 'create_time',
|
||||
comment: '创建时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
createTime: Date;
|
||||
@Column({
|
||||
name: 'update_time',
|
||||
comment: '修改时间',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
updateTime: Date;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import dayjs from "dayjs";
|
||||
@IsTaskPlugin({
|
||||
name: "CertApplyUpload",
|
||||
icon: "ph:certificate",
|
||||
title: "商用证书托管",
|
||||
title: "已有证书托管",
|
||||
group: pluginGroups.cert.key,
|
||||
desc: "手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次)",
|
||||
default: {
|
||||
|
||||
@@ -44,7 +44,7 @@ export class XinnetAccess extends BaseAccess {
|
||||
name: "api-test",
|
||||
action: "TestRequest"
|
||||
},
|
||||
helper: "点击测试接口是否正常"
|
||||
helper: "测试前请务必先在新网后台关闭异地登录保护、关闭动态口令验证\n如果提示需要短信验证码,请等几个小时后再试"
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
|
||||
@@ -57,7 +57,19 @@ export class XinnetProvider extends AbstractDnsProvider<XinnetRecord> {
|
||||
if (!res.list || res.list.length == 0) {
|
||||
throw new Error("域名不存在");
|
||||
}
|
||||
const serviceCode = res.list[0].serviceCode;
|
||||
|
||||
let list = res.list.map((item) => ({
|
||||
domainName: item.domainName,
|
||||
serviceCode: item.serviceCode
|
||||
}));
|
||||
this.logger.info("域名列表:", JSON.stringify(list));
|
||||
|
||||
const domainItem = list.find((item) => item.domainName === domain);
|
||||
if (!domainItem) {
|
||||
throw new Error("域名(" + domain + ")不存在");
|
||||
}
|
||||
|
||||
const serviceCode = domainItem.serviceCode;
|
||||
|
||||
const dcpCookie = await client.getDcpCookie({
|
||||
serviceCode
|
||||
|
||||
Generated
+44
-44
@@ -49,7 +49,7 @@ importers:
|
||||
packages/core/acme-client:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../basic
|
||||
'@peculiar/x509':
|
||||
specifier: ^1.11.0
|
||||
@@ -213,10 +213,10 @@ importers:
|
||||
packages/core/pipeline:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../basic
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/plus-core
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
@@ -412,7 +412,7 @@ importers:
|
||||
packages/libs/lib-k8s:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@kubernetes/client-node':
|
||||
specifier: 0.21.0
|
||||
@@ -452,19 +452,19 @@ importers:
|
||||
packages/libs/lib-server:
|
||||
dependencies:
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/plus-core
|
||||
'@midwayjs/cache':
|
||||
specifier: 3.14.0
|
||||
@@ -610,16 +610,16 @@ importers:
|
||||
packages/plugins/plugin-cert:
|
||||
dependencies:
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../plugin-lib
|
||||
psl:
|
||||
specifier: ^1.9.0
|
||||
@@ -683,16 +683,16 @@ importers:
|
||||
specifier: ^3.964.0
|
||||
version: 3.964.0(aws-crt@1.26.2)
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/plus-core
|
||||
'@kubernetes/client-node':
|
||||
specifier: 0.21.0
|
||||
@@ -783,16 +783,16 @@ importers:
|
||||
packages/pro/commercial-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/lib-server':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-server
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../plus-core
|
||||
'@midwayjs/core':
|
||||
specifier: 3.20.11
|
||||
@@ -865,16 +865,16 @@ importers:
|
||||
packages/pro/plugin-plus:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../plus-core
|
||||
crypto-js:
|
||||
specifier: ^4.2.0
|
||||
@@ -950,7 +950,7 @@ importers:
|
||||
packages/pro/plus-core:
|
||||
dependencies:
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
dayjs:
|
||||
specifier: ^1.11.7
|
||||
@@ -1246,10 +1246,10 @@ importers:
|
||||
version: 0.1.3(zod@3.24.4)
|
||||
devDependencies:
|
||||
'@certd/lib-iframe':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-iframe
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@rollup/plugin-commonjs':
|
||||
specifier: ^25.0.7
|
||||
@@ -1438,46 +1438,46 @@ importers:
|
||||
specifier: ^3.964.0
|
||||
version: 3.964.0(aws-crt@1.26.2)
|
||||
'@certd/acme-client':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/acme-client
|
||||
'@certd/basic':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/basic
|
||||
'@certd/commercial-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/commercial-core
|
||||
'@certd/cv4pve-api-javascript':
|
||||
specifier: ^8.4.2
|
||||
version: 8.4.2
|
||||
'@certd/jdcloud':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-jdcloud
|
||||
'@certd/lib-huawei':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-huawei
|
||||
'@certd/lib-k8s':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-k8s
|
||||
'@certd/lib-server':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/lib-server
|
||||
'@certd/midway-flyway-js':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../libs/midway-flyway-js
|
||||
'@certd/pipeline':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../core/pipeline
|
||||
'@certd/plugin-cert':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../plugins/plugin-cert
|
||||
'@certd/plugin-lib':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../plugins/plugin-lib
|
||||
'@certd/plugin-plus':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/plugin-plus
|
||||
'@certd/plus-core':
|
||||
specifier: ^1.38.3
|
||||
specifier: ^1.38.5
|
||||
version: link:../../pro/plus-core
|
||||
'@google-cloud/publicca':
|
||||
specifier: ^1.3.0
|
||||
@@ -19971,13 +19971,13 @@ snapshots:
|
||||
resolve: 1.22.10
|
||||
semver: 6.3.1
|
||||
|
||||
eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@2.8.8):
|
||||
eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.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@7.32.0)
|
||||
eslint-config-prettier: 8.10.0(eslint@8.57.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:
|
||||
@@ -22377,7 +22377,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@7.32.0))(eslint@7.32.0)(prettier@2.8.8)
|
||||
eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@8.57.0))(eslint@7.32.0)(prettier@2.8.8)
|
||||
execa: 5.1.1
|
||||
inquirer: 7.3.3
|
||||
json5: 2.2.3
|
||||
|
||||
@@ -1 +1 @@
|
||||
02:12
|
||||
00:04
|
||||
|
||||
@@ -1 +1 @@
|
||||
02:25
|
||||
00:18
|
||||
|
||||
Reference in New Issue
Block a user