perf: 优化证书申请速度和成功率,反代地址优化,google基本可以稳定请求。增加请求重试。

This commit is contained in:
xiaojunnuo
2024-10-22 16:21:35 +08:00
parent a705182b85
commit 41d9c3ac83
11 changed files with 66 additions and 18 deletions

View File

@@ -37,8 +37,12 @@ export class CloudflareDnsProvider extends AbstractDnsProvider<CloudflareRecord>
}
async getZoneId(domain: string) {
this.logger.info('获取zoneId:', domain);
const url = `https://api.cloudflare.com/client/v4/zones?name=${domain}`;
const res = await this.doRequestApi(url, null, 'get');
if (res.result.length === 0) {
throw new Error(`未找到域名${domain}的zoneId`);
}
return res.result[0].id;
}