From cae8ed99fa7bb577fdbe77e277bff56507beae4c Mon Sep 17 00:00:00 2001 From: erio Date: Sun, 19 Apr 2026 19:41:44 +0800 Subject: [PATCH] test(tlsfingerprint): update expectations to Claude Code CLI default (X25519MLKEM768 + X25519) --- backend/internal/pkg/tlsfingerprint/dialer_capture_test.go | 6 +++--- .../internal/pkg/tlsfingerprint/dialer_integration_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/internal/pkg/tlsfingerprint/dialer_capture_test.go b/backend/internal/pkg/tlsfingerprint/dialer_capture_test.go index 2e447ec34c..42246850e6 100644 --- a/backend/internal/pkg/tlsfingerprint/dialer_capture_test.go +++ b/backend/internal/pkg/tlsfingerprint/dialer_capture_test.go @@ -137,7 +137,7 @@ func TestDialerAgainstCaptureServer(t *testing.T) { } effectiveKeyShare := tc.profile.KeyShareGroups if len(effectiveKeyShare) == 0 { - effectiveKeyShare = []uint16{29} // X25519 + effectiveKeyShare = []uint16{4588, 29} // X25519MLKEM768 + X25519 (Claude Code CLI default) } effectivePSKModes := tc.profile.PSKModes if len(effectivePSKModes) == 0 { @@ -361,8 +361,8 @@ func TestBuildClientHelloSpecNewFields(t *testing.T) { t.Errorf("default versions: got %v, want 2 entries", e.Versions) } case *utls.KeyShareExtension: - if len(e.KeyShares) != 1 { - t.Errorf("default key shares: got %d, want 1", len(e.KeyShares)) + if len(e.KeyShares) != 2 { + t.Errorf("default key shares: got %d, want 2", len(e.KeyShares)) } } } diff --git a/backend/internal/pkg/tlsfingerprint/dialer_integration_test.go b/backend/internal/pkg/tlsfingerprint/dialer_integration_test.go index 38cddd0d9f..9d35ee5bc6 100644 --- a/backend/internal/pkg/tlsfingerprint/dialer_integration_test.go +++ b/backend/internal/pkg/tlsfingerprint/dialer_integration_test.go @@ -88,14 +88,14 @@ func TestJA3Fingerprint(t *testing.T) { t.Logf("JA3 Hash: %s", fpResp.TLS.JA3Hash) t.Logf("JA4: %s", fpResp.TLS.JA4) - expectedJA3Hash := "44f88fca027f27bab4bb08d4af15f23e" + expectedJA3Hash := "048900f5ae64cc2a49a44389a5406191" if fpResp.TLS.JA3Hash == expectedJA3Hash { t.Logf("✓ JA3 hash matches: %s", expectedJA3Hash) } else { t.Errorf("✗ JA3 hash mismatch: got %s, expected %s", fpResp.TLS.JA3Hash, expectedJA3Hash) } - expectedJA4CipherHash := "_5b57614c22b0_" + expectedJA4CipherHash := "_b262b3658495_" if strings.Contains(fpResp.TLS.JA4, expectedJA4CipherHash) { t.Logf("✓ JA4 cipher hash matches: %s", expectedJA4CipherHash) } else { @@ -119,7 +119,7 @@ func TestAllProfiles(t *testing.T) { Name: "default_node_v24", EnableGREASE: false, }, - JA4CipherHash: "5b57614c22b0", + JA4CipherHash: "b262b3658495", }, { // Linux x64 Node.js v22.17.1 (explicit profile with v22 extensions)