File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1+ import { ProxyAgent } from 'undici' ;
12import { HttpsProxyAgent } from 'https-proxy-agent' ;
23import { SocksProxyAgent } from 'socks-proxy-agent' ;
34
4- import { ProxyAgent } from 'undici'
5-
65type Proxy = {
76 host : string ;
87 password ?: string ;
@@ -47,7 +46,7 @@ export function makeProxyAgent(proxy: Proxy | string): HttpsProxyAgent<string> |
4746 return selectProxyAgent ( proxyUrl ) ;
4847}
4948
50- export function makeProxyAgentUndici ( proxy : Proxy | string ) : ProxyAgent | SocksProxyAgent {
49+ export function makeProxyAgentUndici ( proxy : Proxy | string ) : ProxyAgent | SocksProxyAgent {
5150 let proxyUrl : string ;
5251 let protocol : string ;
5352
@@ -65,8 +64,8 @@ export function makeProxyAgentUndici(proxy: Proxy | string): ProxyAgent|SocksPro
6564
6665 const auth = username && password ? `${ username } :${ password } @` : '' ;
6766 proxyUrl = `${ protocol } ://${ auth } ${ host } :${ port } ` ;
68- }
69- ;
67+ } ;
68+
7069 const PROXY_HTTP_PROTOCOL = 'http' ;
7170 const PROXY_HTTPS_PROTOCOL = 'https' ;
7271 const PROXY_SOCKS4_PROTOCOL = 'socks4' ;
You can’t perform that action at this time.
0 commit comments