kinetex - v1.0.0-rc.1
    Preparing search index...

    Interface Socks5Target

    Target address for SOCKS5 connection.

    TLS upgrade: After createSocks5Tunnel returns a tunnel, you must manually upgrade the connection to TLS. Use Node's tls.connect() or Deno's Deno.connectTls() with the tunnel's underlying socket. The tlsServerName option can be used to specify a different SNI value than the target host.

    // Node.js TLS upgrade
    import tls from "node:tls";
    const tunnel = await createSocks5Tunnel(proxyConfig, target, connector);
    const tlsConn = tls.connect({
    socket: tunnel.conn, // may need adapter layer
    servername: target.tlsServerName || target.host,
    });
    interface Socks5Target {
        host: string;
        port: number;
        tls?: boolean;
        tlsServerName?: string;
    }
    Index

    Properties

    host: string

    Destination hostname or IP

    port: number

    Destination port

    tls?: boolean

    If true, signals intent to upgrade to TLS. Note: The tunnel creation itself does not perform TLS - you must upgrade the returned connection manually after tunnel establishment.

    tlsServerName?: string

    TLS server name for SNI (defaults to target host if not specified)