perf: dns支持火山引擎

This commit is contained in:
xiaojunnuo
2025-03-28 23:27:24 +08:00
parent caa15b4735
commit 99ff879d93
17 changed files with 514 additions and 112 deletions
+3 -1
View File
@@ -133,7 +133,9 @@ export async function walkTxtRecord(recordName) {
async function verifyDnsChallenge(authz, challenge, keyAuthorization, prefix = '_acme-challenge.') {
const recordName = `${prefix}${authz.identifier.value}`;
log(`本地校验TXT记录): ${recordName}`);
const recordValues = await walkTxtRecord(recordName);
let recordValues = await walkTxtRecord(recordName);
//去重
recordValues = [...new Set(recordValues)];
log(`DNS查询成功, 找到 ${recordValues.length} 条TXT记录`);
if (!recordValues.length || !recordValues.includes(keyAuthorization)) {
throw new Error(`没有找到需要的DNS TXT记录: ${recordName},期望:${keyAuthorization},结果:${recordValues}`);
+1
View File
@@ -26,3 +26,4 @@ dist-ssr
test/user.secret.*
test/**/*.js
src/**/*.spec.ts
.test.mjs
@@ -20,6 +20,7 @@ export const pluginGroups = {
aliyun: new PluginGroup("aliyun", "阿里云", 2),
huawei: new PluginGroup("huawei", "华为云", 3),
tencent: new PluginGroup("tencent", "腾讯云", 4),
volcengine: new PluginGroup("volcengine", "火山引擎", 4),
qiniu: new PluginGroup("qiniu", "七牛云", 5),
aws: new PluginGroup("aws", "亚马逊云", 6),
host: new PluginGroup("host", "主机", 7),