Skip to main content

API

parseJA4, JA4Fingerprint, JA4SectionA, and JA4ParseError
1 min read

API#

parseJA4(fingerprint: string): JA4Fingerprint#

Parses a JA4 fingerprint string in the format {sectionA}_{sectionB}_{sectionC} and returns a structured object. Throws JA4ParseError if the input is invalid.

JA4Fingerprint#

PropertyTypeDescription
rawstringThe original fingerprint string
sectionAJA4SectionAParsed human-readable section
cipherSuiteHashstring12-char truncated SHA256 hash of sorted cipher suites
extensionHashstring12-char truncated SHA256 hash of sorted extensions + sig algos

JA4SectionA#

PropertyTypeDescription
rawstringRaw section a string (e.g. "t13d1516h2")
protocolstringTransport protocol: "TCP", "QUIC", or "DTLS"
tlsVersionstringTLS version: "1.0", "1.1", "1.2", or "1.3"
snistring"domain" (SNI present) or "ip"
cipherSuiteCountnumberNumber of cipher suites (excluding GREASE)
extensionCountnumberNumber of extensions (excluding GREASE)
alpnstringFirst ALPN value hint (first+last char), or "00" if none

JA4ParseError#

Extends Error. Thrown when the fingerprint string is malformed or contains invalid values.