Skip to content

createSocks5hFetch

function createSocks5hFetch(
proxy,
connectTimeoutMs?,
requestTimeoutMs?,
maxResponseBytes?,
maxResponseHeaderBytes?): typeof fetch;

Defined in: src/client/socks5h.ts:677

Create a Node fetch implementation whose every connection uses SOCKS5h.

Parameter Type Default value
proxy string undefined
connectTimeoutMs number DEFAULT_CONNECT_TIMEOUT_MS
requestTimeoutMs number DEFAULT_REQUEST_TIMEOUT_MS
maxResponseBytes number DEFAULT_MAX_RESPONSE_BYTES
maxResponseHeaderBytes number DEFAULT_MAX_RESPONSE_HEADER_BYTES

typeof fetch