mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: axios proxy问题修复
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user