mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-03 20:17:36 +03:00
refactor+feat: Custom Client Handshake + Implement ALPS extension (#142)
* refactor: split `CompressCertExtension` changes - Split most of changes for `CompressCertExtension` made to `crypto/tls` files out and moved them to `u_` files. - Edited some `crypto/tls` files to achieve better programmability for uTLS. - Minor styling fix. * feat: implement ALPS Extension draft - Made necessary modifications to existing types to support ALPS. - Ported `ApplicationSettingsExtension` implementation from `ulixee/utls` by @blakebyrnes with some adaptation. Co-Authored-By: Blake Byrnes <115056+blakebyrnes@users.noreply.github.com> * feat: utlsFakeCustomExtension in ALPS - Introducing `utlsFakeCustomExtension` to enable implementation for custom extensions to be exchanged via ALPS. - currently it doesn't do anything. Co-Authored-By: Blake Byrnes <115056+blakebyrnes@users.noreply.github.com> * fix: magic number in `StatusRequestV2Extension` - Fixed magic number `17` in `StatusRequestV2Extension` with pre-defined enum `extensionStatusRequestV2`. Co-authored-by: Blake Byrnes <115056+blakebyrnes@users.noreply.github.com>
This commit is contained in:
parent
1b3a9ad4c5
commit
fb99df2a2e
13 changed files with 375 additions and 140 deletions
|
@ -321,7 +321,7 @@ func (f *Fingerprinter) FingerprintClientHello(data []byte) (*ClientHelloSpec, e
|
|||
case fakeExtensionChannelID:
|
||||
clientHelloSpec.Extensions = append(clientHelloSpec.Extensions, &FakeChannelIDExtension{})
|
||||
|
||||
case fakeExtensionChannelIDOld:
|
||||
case fakeOldExtensionChannelID:
|
||||
clientHelloSpec.Extensions = append(clientHelloSpec.Extensions, &FakeChannelIDExtension{true})
|
||||
|
||||
case fakeExtensionTokenBinding:
|
||||
|
@ -335,7 +335,7 @@ func (f *Fingerprinter) FingerprintClientHello(data []byte) (*ClientHelloSpec, e
|
|||
tokenBindingExt.KeyParameters = keyParameters
|
||||
clientHelloSpec.Extensions = append(clientHelloSpec.Extensions, &tokenBindingExt)
|
||||
|
||||
case fakeExtensionALPS:
|
||||
case utlsExtensionApplicationSettings:
|
||||
// Similar to ALPN (RFC 7301, Section 3.1):
|
||||
// https://datatracker.ietf.org/doc/html/draft-vvv-tls-alps#section-3
|
||||
var protoList cryptobyte.String
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue