feat(proxy): allow socks proxy for the notifications (#7088)

This commit is contained in:
Lanin Aleksandr
2026-03-04 17:08:31 +03:00
committed by GitHub
parent 10180dbd88
commit 6f74cd3ce8
@@ -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;