Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement ALPS extension #142

Merged
merged 4 commits into from Nov 17, 2022
Merged

feat: Implement ALPS extension #142

merged 4 commits into from Nov 17, 2022

Conversation

gaukas
Copy link
Member

@gaukas gaukas commented Nov 11, 2022

Implemented support for ApplicationSettingsExtension -- now the handshake message could be recognized!

PR based on #141. Fixes #124 and #140.

Credits: Major implementation work is done by @blakebyrnes in ulixee/utls.

gaukas and others added 2 commits November 9, 2022 22:17
- 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.
- 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>
gaukas and others added 2 commits November 10, 2022 21:56
- 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>
- Fixed magic number `17` in `StatusRequestV2Extension` with pre-defined enum `extensionStatusRequestV2`.
bogdanfinn added a commit to bogdanfinn/utls that referenced this pull request Nov 11, 2022
@gaukas gaukas linked an issue Nov 12, 2022 that may be closed by this pull request
3 tasks
@@ -47,3 +51,83 @@ func (m *compressedCertificateMsg) unmarshal(data []byte) bool {
}
return true
}

type utlsEncryptedExtensionsMsgExtraFields struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be exporting these fields? Is it something a using application might want to be able to view?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe so. customExtension is just a fake place holder that isn't in any published draft/standard, while applicationSettings could be set in Config for client and read from PeerApplicationSettings in ConnectionState.

@gaukas gaukas merged commit fb99df2 into refraction-networking:master Nov 17, 2022
@gaukas gaukas deleted the implement-alps-extension branch November 17, 2022 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1.2.0 Refactor the code and allow custom handshake messages Implement Encrypted Extensions
3 participants