mirror of https://github.com/certd/certd
fix: 修复dns.la域名申请失败的bug
parent
425bba67c5
commit
1de8eee6ea
|
@ -60,6 +60,7 @@ type AcmeServiceOptions = {
|
|||
reverseProxy?: string;
|
||||
privateKeyType?: PrivateKeyType;
|
||||
signal?: AbortSignal;
|
||||
maxCheckRetryCount?: number;
|
||||
};
|
||||
|
||||
export class AcmeService {
|
||||
|
@ -144,7 +145,7 @@ export class AcmeService {
|
|||
accountKey: conf.key,
|
||||
accountUrl: conf.accountUrl,
|
||||
externalAccountBinding: this.eab,
|
||||
backoffAttempts: 20,
|
||||
backoffAttempts: this.options.maxCheckRetryCount || 20,
|
||||
backoffMin: 5000,
|
||||
backoffMax: 10000,
|
||||
urlMapping,
|
||||
|
@ -282,15 +283,7 @@ export class AcmeService {
|
|||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
async challengeRemoveFn(
|
||||
authz: any,
|
||||
challenge: any,
|
||||
keyAuthorization: string,
|
||||
recordReq: any,
|
||||
recordRes: any,
|
||||
dnsProvider?: IDnsProvider,
|
||||
httpUploader?: HttpChallengeUploader
|
||||
) {
|
||||
async challengeRemoveFn(authz: any, challenge: any, keyAuthorization: string, recordReq: any, recordRes: any, dnsProvider?: IDnsProvider, httpUploader?: HttpChallengeUploader) {
|
||||
this.logger.info("执行清理");
|
||||
|
||||
/* http-01 */
|
||||
|
@ -387,14 +380,7 @@ export class AcmeService {
|
|||
): Promise<{ recordReq?: any; recordRes?: any; dnsProvider?: any; challenge: Challenge; keyAuthorization: string }> => {
|
||||
return await this.challengeCreateFn(authz, keyAuthorizationGetter, providers);
|
||||
},
|
||||
challengeRemoveFn: async (
|
||||
authz: acme.Authorization,
|
||||
challenge: Challenge,
|
||||
keyAuthorization: string,
|
||||
recordReq: any,
|
||||
recordRes: any,
|
||||
dnsProvider: IDnsProvider
|
||||
): Promise<any> => {
|
||||
challengeRemoveFn: async (authz: acme.Authorization, challenge: Challenge, keyAuthorization: string, recordReq: any, recordRes: any, dnsProvider: IDnsProvider): Promise<any> => {
|
||||
return await this.challengeRemoveFn(authz, challenge, keyAuthorization, recordReq, recordRes, dnsProvider, httpUploader);
|
||||
},
|
||||
signal: this.options.signal,
|
||||
|
|
|
@ -203,8 +203,7 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
|||
},
|
||||
maybeNeed: true,
|
||||
required: false,
|
||||
helper:
|
||||
"google服务账号授权与EAB授权选填其中一个,[服务账号授权获取方法](https://certd.docmirror.cn/guide/use/google/)\n服务账号授权需要配置代理或者服务器本身在海外",
|
||||
helper: "google服务账号授权与EAB授权选填其中一个,[服务账号授权获取方法](https://certd.docmirror.cn/guide/use/google/)\n服务账号授权需要配置代理或者服务器本身在海外",
|
||||
mergeScript: `
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
|
@ -268,6 +267,17 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
|||
})
|
||||
skipLocalVerify = false;
|
||||
|
||||
@TaskInput({
|
||||
title: "检查解析重试次数",
|
||||
value: 20,
|
||||
component: {
|
||||
name: "a-input-number",
|
||||
vModel: "value",
|
||||
},
|
||||
helper: "检查域名验证解析记录重试次数,如果你的域名服务商解析生效速度慢,可以适当增加此值",
|
||||
})
|
||||
maxCheckRetryCount = 20;
|
||||
|
||||
acme!: AcmeService;
|
||||
|
||||
eab!: EabAccess;
|
||||
|
@ -314,6 +324,7 @@ HTTP文件验证:不支持泛域名,需要配置网站文件上传`,
|
|||
reverseProxy: this.reverseProxy,
|
||||
privateKeyType: this.privateKeyType,
|
||||
signal: this.ctx.signal,
|
||||
maxCheckRetryCount: this.maxCheckRetryCount,
|
||||
// cnameProxyService: this.ctx.cnameProxyService,
|
||||
// dnsProviderCreator: this.createDnsProvider.bind(this),
|
||||
});
|
||||
|
|
|
@ -130,12 +130,23 @@ export class DnslaDnsProvider extends AbstractDnsProvider<DnslaRecord> {
|
|||
* }
|
||||
*/
|
||||
const url = `/api/record`;
|
||||
/**
|
||||
* A 1
|
||||
* NS 2
|
||||
* CNAME 5
|
||||
* MX 15
|
||||
* TXT 16
|
||||
* AAAA 28
|
||||
* SRV 33
|
||||
* CAA 257
|
||||
* URL转发 256
|
||||
*/
|
||||
const res = await this.doRequestApi(url, {
|
||||
domainId: domainId,
|
||||
type: type,
|
||||
type: 16,
|
||||
host: fullRecord,
|
||||
data: value,
|
||||
ttl: 60,
|
||||
ttl: 300,
|
||||
});
|
||||
|
||||
return res.data;
|
||||
|
|
Loading…
Reference in New Issue