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

@ -9,6 +9,7 @@ import (
"sync"
"github.com/cloudflare/circl/hpke"
"github.com/refraction-networking/utls/dicttls"
)
// Unstable API: This is a work in progress and may change in the future. Using
@ -234,3 +235,19 @@ func (*UnimplementedECHExtension) MarshalClientHello(*UConn) error {
func (*UnimplementedECHExtension) mustEmbedUnimplementedECHExtension() {
panic("mustEmbedUnimplementedECHExtension() is not implemented")
}
func BoringGREASEECH() *GREASEEncryptedClientHelloExtension {
return &GREASEEncryptedClientHelloExtension{
CandidateCipherSuites: []HPKESymmetricCipherSuite{
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_AES_128_GCM,
},
{
KdfId: dicttls.HKDF_SHA256,
AeadId: dicttls.AEAD_CHACHA20_POLY1305,
},
},
CandidatePayloadLens: []uint16{128, 160, 192, 224}, // +16: 144, 176, 208, 240
}
}