Skip to content

Commit c4a7a36

Browse files
authored
feat: export getAgents function for using proxied agents externally (#151)
Exposes the `getAgents` main method to be possible to use it out of got hook.
1 parent a1b29d3 commit c4a7a36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/proxy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function validateProxyProtocol(protocol: string) {
3535
}
3636
}
3737

38-
async function getAgents(parsedProxyUrl: URL, rejectUnauthorized: boolean) {
38+
export async function getAgents(parsedProxyUrl: URL, rejectUnauthorized: boolean) {
3939
// Sockets must not be reused, the proxy server may rotate upstream proxies as well.
4040

4141
const headers: Record<string, string> = {};

0 commit comments

Comments
 (0)