perf: 流水线增加上传证书快捷方式

This commit is contained in:
xiaojunnuo
2025-03-21 01:02:57 +08:00
parent 8b0daf7200
commit 425bba67c5
15 changed files with 342 additions and 54 deletions

View File

@@ -18,6 +18,47 @@ export type { CertInfo };
runStrategy: RunStrategy.AlwaysRun,
},
},
shortcut: {
certUpdate: {
title: "上传证书",
icon: "ph:upload",
action: "onCertUpdate",
form: {
columns: {
crt: {
title: "证书",
type: "textarea",
form: {
component: {
name: "pem-input",
vModel: "modelValue",
textarea: {
row: 4,
},
},
rules: [{ required: true, message: "此项必填" }],
col: { span: 24 },
},
},
key: {
title: "私钥",
type: "textarea",
form: {
component: {
name: "pem-input",
vModel: "modelValue",
textarea: {
row: 4,
},
},
rules: [{ required: true, message: "此项必填" }],
col: { span: 24 },
},
},
},
},
},
},
})
export class CertApplyUploadPlugin extends CertApplyBaseConvertPlugin {
@TaskInput({
@@ -95,6 +136,8 @@ export class CertApplyUploadPlugin extends CertApplyBaseConvertPlugin {
await this.output(certReader, true);
return;
}
async onCertUpdate(data: any) {}
}
new CertApplyUploadPlugin();

View File

@@ -61,7 +61,17 @@ export class AsyncSsh2Client {
this.conn = conn;
resolve(this.conn);
})
.connect(this.connConf);
.connect({
...this.connConf,
algorithms: {
kex: [
"ecdh-sha2-nistp256",
"diffie-hellman-group1-sha1",
"diffie-hellman-group14-sha1", // 示例:添加服务器支持的旧算法
"diffie-hellman-group-exchange-sha256",
],
},
});
} catch (e) {
reject(e);
}