From 879bee962b91a460800dd59b2208215925753c7a Mon Sep 17 00:00:00 2001 From: Jeferson Ramos Date: Mon, 24 Nov 2025 14:17:27 -0300 Subject: [PATCH] lint --- src/utils/makeProxyAgent.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/utils/makeProxyAgent.ts b/src/utils/makeProxyAgent.ts index 5be908f0..03cc58cf 100644 --- a/src/utils/makeProxyAgent.ts +++ b/src/utils/makeProxyAgent.ts @@ -1,7 +1,7 @@ import { socksDispatcher } from 'fetch-socks'; import { HttpsProxyAgent } from 'https-proxy-agent'; import { SocksProxyAgent } from 'socks-proxy-agent'; -import { Agent, ProxyAgent } from 'undici'; +import { ProxyAgent } from 'undici'; type Proxy = { host: string; @@ -25,8 +25,7 @@ function selectProxyAgent(proxyUrl: string): HttpsProxyAgent | SocksProx case PROXY_HTTP_PROTOCOL: return new HttpsProxyAgent(url); case PROXY_SOCKS_PROTOCOL: - case PROXY_SOCKS5_PROTOCOL: - + case PROXY_SOCKS5_PROTOCOL: { let urlSocks = ''; if(url.username && url.password) { @@ -36,6 +35,7 @@ function selectProxyAgent(proxyUrl: string): HttpsProxyAgent | SocksProx } return new SocksProxyAgent(urlSocks); + } default: throw new Error(`Unsupported proxy protocol: ${url.protocol}`); } @@ -73,7 +73,6 @@ export function makeProxyAgentUndici(proxy: Proxy | string) { proxyUrl = `${protocol}://${auth}${host}:${port}`; } - // Normalização protocol = protocol.toLowerCase(); const PROXY_HTTP_PROTOCOL = 'http'; @@ -84,7 +83,6 @@ export function makeProxyAgentUndici(proxy: Proxy | string) { switch (protocol) { case PROXY_HTTP_PROTOCOL: case PROXY_HTTPS_PROTOCOL: - // Proxy HTTP/HTTPS → usar ProxyAgent do Undici return new ProxyAgent(proxyUrl); case PROXY_SOCKS4_PROTOCOL: