fix: grease ech parrot for chrome 120 (#271)

This commit is contained in:
hax0r31337 2023-12-16 01:03:25 +08:00 committed by GitHub
parent ed573b3ab4
commit 2d6258a928
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 34 deletions

View file

@ -726,23 +726,7 @@ func utlsIdToSpec(id ClientHelloID) (ClientHelloSpec, error) {
CertCompressionBrotli,
}},
&ApplicationSettingsExtension{SupportedProtocols: []string{"h2"}},
&GREASEEncryptedClientHelloExtension{
CandidateCipherSuites: []HPKESymmetricCipherSuite{
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_AES_128_GCM,
},
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_AES_256_GCM,
},
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_CHACHA20_POLY1305,
},
},
CandidatePayloadLens: []uint16{128, 160}, // +16: 144, 176
},
BoringGREASEECH(),
&UtlsGREASEExtension{},
}),
}, nil
@ -816,23 +800,7 @@ func utlsIdToSpec(id ClientHelloID) (ClientHelloSpec, error) {
CertCompressionBrotli,
}},
&ApplicationSettingsExtension{SupportedProtocols: []string{"h2"}},
&GREASEEncryptedClientHelloExtension{
CandidateCipherSuites: []HPKESymmetricCipherSuite{
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_AES_128_GCM,
},
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_AES_256_GCM,
},
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_CHACHA20_POLY1305,
},
},
CandidatePayloadLens: []uint16{128, 160}, // +16: 144, 176
},
BoringGREASEECH(),
&UtlsGREASEExtension{},
}),
}, nil