Skip to content

Expose SNI from ClientHello in ClientHelloSpec #369

Description

@samczsun

I'd like access to the SNI (so I can construct an identical uTLS client and validate the same hostname). It seems like a shame that all the code for parsing the ClientHello is in this library, but this value is not exposed anywhere, and so I have to reimplement all the logic myself or install a totally separate dependency.

Would you consider updating SNIExtension.Write to fully unmarshal the extension (as a generic unmarshal method should) and then ClientHelloSpec.ReadTLSExtensions can special-case SNIExtension, read out the value into a separate field on ClientHelloSpec or something, and then zero out the original field? I'm happy to make a PR to implement this if it sounds reasonable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions