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

How can I check clientHello in server #309

Open
WAY29 opened this issue Jul 31, 2024 · 1 comment
Open

How can I check clientHello in server #309

WAY29 opened this issue Jul 31, 2024 · 1 comment

Comments

@WAY29
Copy link

WAY29 commented Jul 31, 2024

I tried using the utls library to customize the ClientHello. Now, I'm using utls to write a test server to check if the client has successfully customized the ClientHello, but it seems I have no way to do this. One possible approach could be to use a callback in conn.serverHandshake, or have I missed something?

@WAY29 WAY29 changed the title serverHandshake Callback so that I can check clientHello in test server How can I check clientHello in server Jul 31, 2024
@fedosgad
Copy link
Contributor

You can wrap a TCP listener at the server so TLS bytes can be accessed, extract ClientHello (parsing TLS' TLV structure is quite easy, at least to read only the first message) and use UnmarshalClientHello() or Fingerprinter.FingerprintClientHello() to parse raw bytes to a more usable form.
Take a look at https://github.com/fedosgad/mirror_proxy/blob/master/hijackers/utls.go#L215 and https://github.com/fedosgad/mirror_proxy/blob/master/hijackers/utls.go#L76 - maybe it will help.

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

No branches or pull requests

2 participants