Skip to content

SshSocketFactory

type SshSocketFactory = (context: SshSocketFactoryContext) => Readable | Promise<Readable>;

Defined in: src/types/public.ts:131

Creates a preconnected socket-like stream for SSH sessions.

Use this hook for HTTP CONNECT, SOCKS, bastion, or custom tunnel integrations.

ParameterTypeDescription
contextSshSocketFactoryContextResolved SSH target information for the socket being opened.

Readable | Promise<Readable>

Preconnected readable stream, or a promise for one, passed to the SSH adapter socket option.