Skip to content

dialSocks5h

function dialSocks5h(
proxyUri,
targetHost,
targetPort,
options?): Promise<Socket>;

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

Open one TCP tunnel through a SOCKS5h proxy. Target DNS names are encoded as SOCKS domain names and therefore resolved only by the proxy.

Parameter Type
proxyUri string | Socks5hProxy
targetHost string
targetPort number
options { connectTimeoutMs?: number; signal?: AbortSignal; }
options.connectTimeoutMs? number
options.signal? AbortSignal

Promise<Socket>