Skip to content

Fix incorrect ALPN two-character encoding - #47

Merged
vlvkobal merged 2 commits into
mainfrom
fix-alpn
Jan 27, 2026
Merged

Fix incorrect ALPN two-character encoding#47
vlvkobal merged 2 commits into
mainfrom
fix-alpn

Conversation

@vlvkobal

Copy link
Copy Markdown
Collaborator

Fixes #45

Previously, the ALPN two-character code was derived by blindly taking the first and last characters of the ALPN string, which could produce invalid results. The new logic implements the JA4 specification: ASCII-alphanumeric values are used directly, with a hexadecimal fallback for other cases.

This change aligns JA4, JA4 String, and JA4one outputs and adds tests covering edge cases.

@vlvkobal
vlvkobal merged commit 86821e2 into main Jan 27, 2026
1 check passed
@vlvkobal
vlvkobal deleted the fix-alpn branch January 27, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single character ALPN handling discrepancies

2 participants