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

Add TLS record fragmentation #176

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Lanius-collaris
Copy link

No description provided.

@SadeghHayeri
Copy link
Owner

Hello,
sorry for late response, what does this PR for? the main functionally of fragmenting TLS record already exist in the code (fragment first packet will be fragmented and this is fundamental of GT)
Can you explain it more?

@Lanius-collaris
Copy link
Author

Both TCP and the record layer of TLS support fragmentation, this PR is for the latter.

Ref:
Circumventing the GFW with TLS Record Fragmentation


Handshake messages MAY be coalesced into a single TLSPlaintext record or fragmented across several records…

RFC 8446 section-5.1


Data Structures at RFC 8446 Appendix-B

uint16 ProtocolVersion;
enum {
      invalid(0),
      change_cipher_spec(20),
      alert(21),
      handshake(22),
      application_data(23),
      heartbeat(24),  /* [RFC 6520](https://datatracker.ietf.org/doc/html/rfc6520) */
      (255)
} ContentType;

struct {
      ContentType type;
      ProtocolVersion legacy_record_version;
      uint16 length;
      opaque fragment[TLSPlaintext.length];
} TLSPlaintext;

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.

2 participants