Skip to content

Socks5hHttpConnectOptions

Defined in: src/client/types.ts:116

Options for the Node-only httpConnectSocks5h constructor.

optional acceptedMaxResponseBytes?: number;

Defined in: src/client/types.ts:49

Decoded response bytes accepted by this client and advertised on every HTTP request. Minimum 64 KiB. Defaults to 64 MiB in browser/workerd builds and 256 MiB in native builds.

HttpConnectOptions.acceptedMaxResponseBytes


optional authorization?: string;

Defined in: src/client/types.ts:36

Authorization header value (e.g. “Bearer ”). Sent with every request.

HttpConnectOptions.authorization


optional compressionLevel?: number;

Defined in: src/client/types.ts:34

When set, request bodies are zstd-compressed at this level and Accept-Encoding: zstd is sent. Omit to disable compression.

HttpConnectOptions.compressionLevel


optional connectTimeoutMs?: number;

Defined in: src/client/types.ts:118

One deadline for each proxy TCP setup, SOCKS5 negotiation, and TLS handshake. Default: 5000 ms.


optional description?: ServiceDescription;

Defined in: src/client/types.ts:18

Statically declared service description. When supplied, the client uses these method and stream schemas directly and does not introspect at all. This is required for services that intentionally expose only their declared RPC surface and for exact exchange input schemas that cannot be recovered by inspecting runtime values.

HttpConnectOptions.description


optional externalLocation?: ExternalLocationConfig;

Defined in: src/client/types.ts:38

External storage config for resolving externalized batches.

HttpConnectOptions.externalLocation


optional maxResponseBytes?: number;

Defined in: src/client/types.ts:122

Maximum buffered HTTP response, including headers. Default: 268435456 bytes.


optional maxResponseHeaderBytes?: number;

Defined in: src/client/types.ts:124

Maximum HTTP response-header bytes within maxResponseBytes. Default: 65536 bytes.


optional onLog?: (msg) => void;

Defined in: src/client/types.ts:32

Callback invoked for each log/error message the server emits during a request.

Parameter Type
msg LogMessage

void

HttpConnectOptions.onLog


optional prefix?: string;

Defined in: src/client/types.ts:30

Route prefix the server mounts its methods under (e.g. /api). Trailing slashes are stripped. Defaults to no prefix.

HttpConnectOptions.prefix


optional protocol?: string;

Defined in: src/client/types.ts:28

Which protocol to bind to, skipping reflection’s list_protocols hop.

Introspection is two round trips – what does this server host, then describe one of them – because a server may host several and there is no longer a single “the” protocol to ask about without asking. Naming one here answers the first question locally. Defaults to the first hosted protocol that is not framework-reserved.

HttpConnectOptions.protocol


optional requestTimeoutMs?: number;

Defined in: src/client/types.ts:120

Total deadline for one HTTP request, including setup and response. Default: 300000 ms.


optional signal?: AbortSignal;

Defined in: src/client/types.ts:126

Cancels HTTP requests and any in-progress proxy setup.