mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
Merge branch 'v2-dev' into v2
This commit is contained in:
@@ -7,7 +7,7 @@ import { CertApplyPluginNames} from '@certd/plugin-cert';
|
||||
title: '阿里云-部署证书至OSS',
|
||||
icon: 'svg:icon-aliyun',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '自动部署域名证书至阿里云OSS',
|
||||
desc: '部署域名证书至阿里云OSS自定义域名,不是上传到阿里云oss',
|
||||
default: {
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||
|
||||
@@ -26,6 +26,11 @@ export type CloudflareRecord = {
|
||||
})
|
||||
export class CloudflareDnsProvider extends AbstractDnsProvider<CloudflareRecord> {
|
||||
access!: CloudflareAccess;
|
||||
usePunyCode(): boolean {
|
||||
//是否使用punycode来添加解析记录
|
||||
//默认都使用原始中文域名来添加
|
||||
return true;
|
||||
}
|
||||
async onInstance() {
|
||||
//一些初始化的操作
|
||||
// 也可以通过ctx成员变量传递context
|
||||
|
||||
@@ -91,8 +91,9 @@ export class FlexCDNRefreshCert extends AbstractTaskPlugin {
|
||||
* timeEndAt: Math.floor((new Date(currentInfo.validTo)).getTime() / 1000),
|
||||
*
|
||||
*/
|
||||
const commonNames =[ certReader.getMainDomain()]
|
||||
const dnsNames = certReader.getAltNames()
|
||||
const topCrt = CertReader.readCertDetail(certReader.cert.ic)
|
||||
const commonNames =[ topCrt.detail.issuer.commonName]
|
||||
const dnsNames = certReader.getAllDomains()
|
||||
const timeBeginAt = Math.floor(certReader.detail.notBefore.getTime() / 1000);
|
||||
const timeEndAt = Math.floor(certReader.detail.notAfter.getTime() / 1000);
|
||||
const body = {
|
||||
|
||||
@@ -77,7 +77,13 @@ export class GithubCheckRelease extends AbstractTaskPlugin {
|
||||
this.logger.info(`有更新,${lastVersion??"0"}->${res.tag_name}`)
|
||||
this.lastVersion = res.tag_name;
|
||||
|
||||
const body = res.body.replaceAll("* ","- ")
|
||||
// const body = res.body.replaceAll("* ","- ")
|
||||
//仅每行开头的* 替换成 -, *号前面可以有空格
|
||||
const body = res.body.replace(/^(\s*)\* /gm, "$1- ")
|
||||
|
||||
if (this.notificationIds == null){
|
||||
this.notificationIds = [0]
|
||||
}
|
||||
//发送通知
|
||||
for (const notificationId of this.notificationIds) {
|
||||
await this.ctx.notificationService.send({
|
||||
|
||||
@@ -23,6 +23,11 @@ export class NamesiloDnsProvider extends AbstractDnsProvider<NamesiloRecord> {
|
||||
// 也可以通过ctx成员变量传递context
|
||||
this.access = this.ctx.access as NamesiloAccess;
|
||||
}
|
||||
usePunyCode(): boolean {
|
||||
//是否使用punycode来添加解析记录
|
||||
//默认都使用原始中文域名来添加
|
||||
return true;
|
||||
}
|
||||
|
||||
private async doRequest(url: string, params: any = null) {
|
||||
params = merge(
|
||||
|
||||
@@ -93,7 +93,7 @@ export class ProxmoxUploadCert extends AbstractPlusTaskPlugin {
|
||||
|
||||
async getClient() {
|
||||
const access: ProxmoxAccess = await this.getAccess<ProxmoxAccess>(this.accessId);
|
||||
const pve = await import('@corsinvest/cv4pve-api-javascript');
|
||||
const pve = await import('@certd/cv4pve-api-javascript');
|
||||
const client = new pve.PveClient(access.host, access.port);
|
||||
const login = await client.login(access.username, access.password, access.realm || 'pam');
|
||||
if (!login) {
|
||||
|
||||
Reference in New Issue
Block a user