Skip to content

fix: generate ClientHelloSpec only once#306

Merged
gaukas merged 2 commits intorefraction-networking:masterfrom
adotkhan:fix-random
Jul 19, 2024
Merged

fix: generate ClientHelloSpec only once#306
gaukas merged 2 commits intorefraction-networking:masterfrom
adotkhan:fix-random

Conversation

@adotkhan
Copy link
Copy Markdown
Contributor

This fixes an issue introduced in #301 where calling BuildHanshakeStateWithoutSession with a random profile, generates a new CilentHelloSpec on each call.

This PR assume that UConn.ClientHelloID is read-only and that it's value should not be modified, which is my understanding of uTLS currently operates. If this assumption is false, another workaround needs to be found.

A review of this is very much appreciated.

Copy link
Copy Markdown
Contributor

@gaukas gaukas left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for doing this. I am approving this PR for now, and if no further major change is made, you can expect it get merged by the end of this week.

Co-authored-by: Gaukas Wang <i@gauk.as>
Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>
@adotkhan
Copy link
Copy Markdown
Contributor Author

Thank you for the review, change applied.

@gaukas gaukas merged commit 4a28d1a into refraction-networking:master Jul 19, 2024
adotkhan added a commit to Psiphon-Labs/utls that referenced this pull request Dec 10, 2024
* fix: generate ClientHelloSpec only once

* chore: remove empty line in u_parrots.go

Co-authored-by: Gaukas Wang <i@gauk.as>
Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>

---------

Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>
Co-authored-by: Gaukas Wang <i@gauk.as>
adotkhan added a commit to Psiphon-Labs/utls that referenced this pull request Dec 10, 2024
* fix: generate ClientHelloSpec only once

* chore: remove empty line in u_parrots.go

Co-authored-by: Gaukas Wang <i@gauk.as>
Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>

---------

Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>
Co-authored-by: Gaukas Wang <i@gauk.as>
adotkhan added a commit to Psiphon-Labs/utls that referenced this pull request Feb 5, 2025
* fix: generate ClientHelloSpec only once

* chore: remove empty line in u_parrots.go

Co-authored-by: Gaukas Wang <i@gauk.as>
Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>

---------

Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>
Co-authored-by: Gaukas Wang <i@gauk.as>
sardanioss pushed a commit to sardanioss/utls that referenced this pull request Jan 16, 2026
* fix: generate ClientHelloSpec only once

* chore: remove empty line in u_parrots.go

Co-authored-by: Gaukas Wang <i@gauk.as>
Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>

---------

Signed-off-by: adotkhan <61702862+adotkhan@users.noreply.github.com>
Co-authored-by: Gaukas Wang <i@gauk.as>
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