MikuMikuBeam/server/utils/proxyUtils.js
2025-01-20 01:08:36 -03:00

9 lines
245 B
JavaScript

const METHODS = {
http: ["http", "https"],
tcp: ["socks4", "socks5"],
udp: ["socks4", "socks5"],
};
export function filterProxies(proxies, method) {
return proxies.filter((proxy) => METHODS[method].includes(proxy.protocol));
}