MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAddressFamily

Function getAddressFamily

source code/utils/proxy.ts:43–57  ·  view source on GitHub ↗
(options: LookupOptions)

Source from the content-addressed store, hash-verified

41 * Handles: 0 | 4 | 6 | 'IPv4' | 'IPv6' | undefined
42 */
43export function getAddressFamily(options: LookupOptions): 0 | 4 | 6 {
44 switch (options.family) {
45 case 0:
46 case 4:
47 case 6:
48 return options.family
49 case 'IPv6':
50 return 6
51 case 'IPv4':
52 case undefined:
53 return 4
54 default:
55 throw new Error(`Unsupported address family: ${options.family}`)
56 }
57}
58
59type EnvLike = Record<string, string | undefined>
60

Callers 1

createHttpsProxyAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected