chore: axios proxy问题修复

This commit is contained in:
xiaojunnuo
2024-03-08 17:42:47 +08:00
parent 5b576112d1
commit 8d44171875
5 changed files with 30 additions and 13 deletions
+11 -1
View File
@@ -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