Skip to content

Add AlwaysIncludePSK config option to force PSK extension inclusion#388

Open
thesinakamali wants to merge 1 commit intorefraction-networking:masterfrom
thesinakamali:feature/always-include-psk
Open

Add AlwaysIncludePSK config option to force PSK extension inclusion#388
thesinakamali wants to merge 1 commit intorefraction-networking:masterfrom
thesinakamali:feature/always-include-psk

Conversation

@thesinakamali
Copy link

Add a Config.AlwaysIncludePSK option that, when enabled, ensures the PreSharedKey extension is always present in the ClientHello for TLS 1.3 connections, even if the selected ClientHelloSpec does not include it. This enables session resumption with browser fingerprint specs that omit the PSK extension. When no cached session exists, OmitEmptyPsk controls whether the empty extension is omitted.

The PSK extension is appended as the last extension per RFC 8446, Section 4.2.11.

Changes:

  • Add AlwaysIncludePSK field to Config in common.go
  • Include AlwaysIncludePSK in Config.Clone()
  • Add PSK auto-injection logic in ApplyPreset() in u_parrots.go

Add a Config.AlwaysIncludePSK option that, when enabled, ensures the
PreSharedKey extension is always present in the ClientHello for TLS 1.3
connections, even if the selected ClientHelloSpec does not include it.
This enables session resumption with browser fingerprint specs that omit
the PSK extension. When no cached session exists, OmitEmptyPsk controls
whether the empty extension is omitted.

The PSK extension is appended as the last extension per RFC 8446,
Section 4.2.11.

Changes:
- Add AlwaysIncludePSK field to Config in common.go
- Include AlwaysIncludePSK in Config.Clone()
- Add PSK auto-injection logic in ApplyPreset() in u_parrots.go
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.

1 participant