fix(panel): set ALPN to h3 when switching to Hysteria protocol (#4076)

- Automatically explicitly set ALPN to ['h3'] for Hysteria to prevent QUIC handshake mismatch.
This commit is contained in:
Imgodmaoyouknow 2026-04-22 15:56:03 +08:00 committed by GitHub
parent 814e6ad69c
commit 292eb992f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1396,6 +1396,8 @@ class Inbound extends XrayCommonClass {
if (protocol === Protocols.HYSTERIA) { if (protocol === Protocols.HYSTERIA) {
this.stream.network = 'hysteria'; this.stream.network = 'hysteria';
this.stream.security = 'tls'; this.stream.security = 'tls';
// Hysteria runs over QUIC and must not inherit TCP TLS ALPN defaults.
this.stream.tls.alpn = [ALPN_OPTION.H3];
} }
} }
@ -2863,4 +2865,4 @@ Inbound.TunSettings = class extends Inbound.Settings {
autoOutboundsInterface: this.autoOutboundsInterface, autoOutboundsInterface: this.autoOutboundsInterface,
}; };
} }
}; };