perf: 证书申请支持letencrypt profile选项

This commit is contained in:
xiaojunnuo
2025-06-06 15:12:24 +08:00
parent ac87bc57e9
commit 2eb0e54909
6 changed files with 75 additions and 42 deletions

View File

@@ -75,6 +75,9 @@ export default async (client, userOpts) => {
log("[auto] Placing new certificate order with ACME provider");
const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
if (opts.profile && client.sslProvider === 'letsencrypt' ){
orderPayload.profile = opts.profile;
}
const order = await client.createOrder(orderPayload);
const authorizations = await client.getAuthorizations(order);

View File

@@ -90,10 +90,12 @@ const defaultOpts = {
*/
class AcmeClient {
sslProvider
constructor(opts) {
if (!Buffer.isBuffer(opts.accountKey)) {
opts.accountKey = Buffer.from(opts.accountKey);
}
this.sslProvider = opts.sslProvider;
this.opts = { ...defaultOpts, ...opts };
this.backoffOpts = {

View File

@@ -66,6 +66,7 @@ export interface ClientAutoOptions {
challengePriority?: string[];
preferredChain?: string;
signal?: AbortSignal;
profile?:string;
}
export class Client {