tls-devicer
    Preparing search index...

    Function extractProfileFromSocket

    • Attempt to read raw TLS properties exposed on a Node.js TLSSocket.

      This requires Node.js >= 20 with enableTrace: true or a custom TLS server that exposes socket._tlsConnectState / socket.getPeerCertificate.

      Returns a partial TlsProfile with whatever information is available from the socket; most fields typically require a reverse-proxy to inject headers (see createTlsMiddleware).

      Parameters

      • socket: Socket & {
            getCipher?: () => | {
                name?: string;
                standardName?: string;
                version?: string;
            }
            | null;
            getProtocol?: () => string | null;
            getSharedSigalgs?: () => string[];
            isSessionReused?: () => boolean;
        }

        A tls.TLSSocket from a Node.js HTTPS/TLS server.

      Returns Partial<TlsProfile>