|
|
|
|
@ -2,6 +2,7 @@ const { Liquid } = require("liquidjs");
|
|
|
|
|
const { DOWN } = require("../../src/util");
|
|
|
|
|
const { HttpProxyAgent } = require("http-proxy-agent");
|
|
|
|
|
const { HttpsProxyAgent } = require("https-proxy-agent");
|
|
|
|
|
const { SocksProxyAgent } = require("socks-proxy-agent");
|
|
|
|
|
|
|
|
|
|
class NotificationProvider {
|
|
|
|
|
/**
|
|
|
|
|
@ -183,6 +184,10 @@ class NotificationProvider {
|
|
|
|
|
const agent = new HttpsProxyAgent(proxyEnv);
|
|
|
|
|
axiosConfig.httpAgent = agent;
|
|
|
|
|
axiosConfig.httpsAgent = agent;
|
|
|
|
|
} else if (["socks:", "socks4:", "socks5:", "socks5h:"].includes(proxyUrl.protocol)) {
|
|
|
|
|
const agent = new SocksProxyAgent(proxyEnv);
|
|
|
|
|
axiosConfig.httpAgent = agent;
|
|
|
|
|
axiosConfig.httpsAgent = agent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
axiosConfig.proxy = false;
|
|
|
|
|
|