fix(Dns01Handler): Update dependency versions and refine Dns01Handler implementation
This commit is contained in:
@ -5,14 +5,14 @@ import type { IChallengeHandler } from './IChallengeHandler.js';
|
||||
* DNS-01 challenge handler using CloudflareAccount and Smartdns.
|
||||
*/
|
||||
export class Dns01Handler implements IChallengeHandler<plugins.tsclass.network.IDnsChallenge> {
|
||||
private cf: any;
|
||||
private cf: plugins.tsclass.network.IConvenientDnsProvider;
|
||||
private smartdns: plugins.smartdnsClient.Smartdns;
|
||||
|
||||
constructor(
|
||||
cloudflareAccount: any,
|
||||
convenientDnsProvider: plugins.tsclass.network.IConvenientDnsProvider,
|
||||
smartdnsInstance?: plugins.smartdnsClient.Smartdns,
|
||||
) {
|
||||
this.cf = cloudflareAccount;
|
||||
this.cf = convenientDnsProvider;
|
||||
this.smartdns = smartdnsInstance ?? new plugins.smartdnsClient.Smartdns({});
|
||||
}
|
||||
|
||||
@ -37,4 +37,8 @@ export class Dns01Handler implements IChallengeHandler<plugins.tsclass.network.I
|
||||
// remove DNS TXT record
|
||||
await this.cf.convenience.acmeRemoveDnsChallenge(ch);
|
||||
}
|
||||
|
||||
public async checkWetherDomainIsSupported(domainArg: string): Promise<boolean> {
|
||||
return this.cf.convenience.isDomainSupported(domainArg);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user