Skip to content

Fix Hysteria2/QUIC ALPN negotiation failure with ACME#4213

Open
BioniCosmos wants to merge 110 commits into
SagerNet:testingfrom
BioniCosmos:testing
Open

Fix Hysteria2/QUIC ALPN negotiation failure with ACME#4213
BioniCosmos wants to merge 110 commits into
SagerNet:testingfrom
BioniCosmos:testing

Conversation

@BioniCosmos

@BioniCosmos BioniCosmos commented Jun 13, 2026

Copy link
Copy Markdown

Hysteria2 inbounds using ACME with the default TLS-ALPN-01 challenge fail the QUIC handshake with CRYPTO_ERROR 0x178 (remote): tls: no application protocol in client side. Manually specifying certificate_path/key_path, or using a DNS-01 solver, works around the issue.

The key is: NextProtos could be reused in multiple stages. However, the current implemention failed to strip the ALPN settings used in the ACME stage, causing issue in the following communication.

if len(tlsConfig.NextProtos()) == 0 {
tlsConfig.SetNextProtos([]string{http3.NextProtoH3})
}

Related issues

#3389

Tested working in v1.13.12.

@nekohasekai nekohasekai force-pushed the testing branch 7 times, most recently from f7ca395 to f27d0e3 Compare June 21, 2026 04:16
@nekohasekai nekohasekai force-pushed the testing branch 2 times, most recently from 22fe3b6 to b2d51f6 Compare June 29, 2026 03:43
@nekohasekai nekohasekai force-pushed the testing branch 20 times, most recently from 74aa66c to 1dc8872 Compare July 11, 2026 08:15
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.

3 participants