diff --git a/packages/core/acme-client/src/auto.js b/packages/core/acme-client/src/auto.js index 4a13a48f..7df48cfd 100644 --- a/packages/core/acme-client/src/auto.js +++ b/packages/core/acme-client/src/auto.js @@ -187,10 +187,22 @@ module.exports = async function(client, userOpts) { } - await runPromisesSerially(challengePromises); + try { + await runPromisesSerially(challengePromises); + } + finally { + await runPromisesSerially(clearTasks); + } + + // try { + // await Promise.allSettled(challengePromises); + // } + // finally { + // log('清理challenge'); + // await Promise.allSettled(clearTasks); + // } + - log('清理challenge'); - await runPromisesSerially(clearTasks); log('challenge结束'); // log('[auto] Waiting for challenge valid status'); diff --git a/packages/core/acme-client/src/http.js b/packages/core/acme-client/src/http.js index b3580263..fe446116 100644 --- a/packages/core/acme-client/src/http.js +++ b/packages/core/acme-client/src/http.js @@ -3,10 +3,20 @@ */ const { createHmac, createSign, constants: { RSA_PKCS1_PADDING } } = require('crypto'); +const HttpsProxyAgent = require('https-proxy-agent'); const { getJwk } = require('./crypto'); const { log } = require('./logger'); -const axios = require('./axios'); +const axios1 = require('./axios'); +const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy; +let httpsAgent = null; +if (httpsProxy) { + httpsAgent = new HttpsProxyAgent(httpsProxy); +} +const axios = axios1.create({ + proxy: false, + httpsAgent +}); /** * ACME HTTP client diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index 0596aba3..7b4c74de 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -37,7 +37,7 @@ export class CertApplyPlugin extends AbstractTaskPlugin { span: 24, }, helper: - "支持通配符域名,例如: *.foo.com 、 *.test.handsfree.work\n" + + "支持通配符域名,例如: *.foo.com、foo.com、*.test.handsfree.work\n" + "支持多个域名、多个子域名、多个通配符域名打到一个证书上(域名必须是在同一个DNS提供商解析)\n" + "多级子域名要分成多个域名输入(*.foo.com的证书不能用于xxx.yyy.foo.com)\n" + "输入一个回车之后,再输入下一个", diff --git a/packages/ui/certd-client/src/components/editable.vue b/packages/ui/certd-client/src/components/editable.vue index 2c090322..8e89782d 100644 --- a/packages/ui/certd-client/src/components/editable.vue +++ b/packages/ui/certd-client/src/components/editable.vue @@ -1,14 +1,7 @@