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 and others added 18 commits June 8, 2026 08:51
The URL test history update hook and the Clash mode update hook were
single-slot: the API service's attached service overwrote the hook set
by the daemon, so clients stopped receiving group updates. Replace both
with multicast hook lists.

Also share a single URL test history storage via context: Clash API
looked it up under a key nobody registered and fell back to its own
empty storage, so dashboards showed no delay once an API service was
configured. Selector changes now notify through the shared storage,
covering selections made from any API surface.
@nekohasekai nekohasekai force-pushed the testing branch 10 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
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