Skip to content

Commit 877cd49

Browse files
committed
feat: Add Chrome 131 parrot
1 parent 5ce39b8 commit 877cd49

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

u_common.go

+2
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ var (
637637
HelloChrome_120 = ClientHelloID{helloChrome, "120", nil, nil}
638638
// Chrome w/ Post-Quantum Key Agreement and Encrypted ClientHello
639639
HelloChrome_120_PQ = ClientHelloID{helloChrome, "120_PQ", nil, nil}
640+
// Chrome w/ ML-KEM curve
641+
HelloChrome_131 = ClientHelloID{helloChrome, "131", nil, nil}
640642

641643
HelloIOS_Auto = HelloIOS_14
642644
HelloIOS_11_1 = ClientHelloID{helloIOS, "111", nil, nil} // legacy "111" means 11.1

u_parrots.go

+73
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,79 @@ func utlsIdToSpec(id ClientHelloID) (ClientHelloSpec, error) {
807807
&UtlsGREASEExtension{},
808808
}),
809809
}, nil
810+
case HelloChrome_131:
811+
return ClientHelloSpec{
812+
CipherSuites: []uint16{
813+
GREASE_PLACEHOLDER,
814+
TLS_AES_128_GCM_SHA256,
815+
TLS_AES_256_GCM_SHA384,
816+
TLS_CHACHA20_POLY1305_SHA256,
817+
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
818+
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
819+
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
820+
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
821+
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
822+
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
823+
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
824+
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
825+
TLS_RSA_WITH_AES_128_GCM_SHA256,
826+
TLS_RSA_WITH_AES_256_GCM_SHA384,
827+
TLS_RSA_WITH_AES_128_CBC_SHA,
828+
TLS_RSA_WITH_AES_256_CBC_SHA,
829+
},
830+
CompressionMethods: []byte{
831+
0x00, // compressionNone
832+
},
833+
Extensions: ShuffleChromeTLSExtensions([]TLSExtension{
834+
&UtlsGREASEExtension{},
835+
&SNIExtension{},
836+
&ExtendedMasterSecretExtension{},
837+
&RenegotiationInfoExtension{Renegotiation: RenegotiateOnceAsClient},
838+
&SupportedCurvesExtension{[]CurveID{
839+
GREASE_PLACEHOLDER,
840+
X25519MLKEM768,
841+
X25519,
842+
CurveP256,
843+
CurveP384,
844+
}},
845+
&SupportedPointsExtension{SupportedPoints: []byte{
846+
0x00, // pointFormatUncompressed
847+
}},
848+
&SessionTicketExtension{},
849+
&ALPNExtension{AlpnProtocols: []string{"h2", "http/1.1"}},
850+
&StatusRequestExtension{},
851+
&SignatureAlgorithmsExtension{SupportedSignatureAlgorithms: []SignatureScheme{
852+
ECDSAWithP256AndSHA256,
853+
PSSWithSHA256,
854+
PKCS1WithSHA256,
855+
ECDSAWithP384AndSHA384,
856+
PSSWithSHA384,
857+
PKCS1WithSHA384,
858+
PSSWithSHA512,
859+
PKCS1WithSHA512,
860+
}},
861+
&SCTExtension{},
862+
&KeyShareExtension{[]KeyShare{
863+
{Group: CurveID(GREASE_PLACEHOLDER), Data: []byte{0}},
864+
{Group: X25519Kyber768Draft00},
865+
{Group: X25519},
866+
}},
867+
&PSKKeyExchangeModesExtension{[]uint8{
868+
PskModeDHE,
869+
}},
870+
&SupportedVersionsExtension{[]uint16{
871+
GREASE_PLACEHOLDER,
872+
VersionTLS13,
873+
VersionTLS12,
874+
}},
875+
&UtlsCompressCertExtension{[]CertCompressionAlgo{
876+
CertCompressionBrotli,
877+
}},
878+
&ApplicationSettingsExtension{SupportedProtocols: []string{"h2"}},
879+
BoringGREASEECH(),
880+
&UtlsGREASEExtension{},
881+
}),
882+
}, nil
810883
case HelloFirefox_55, HelloFirefox_56:
811884
return ClientHelloSpec{
812885
TLSVersMax: VersionTLS12,

0 commit comments

Comments
 (0)