From 2cd3e2f84827146aa1bc01431b0b09d10019d880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 14 Nov 2026 07:52:37 +0000 Subject: [PATCH] Remove ineffective ALPN override from reality client BuildHandshakeState already copied the fingerprint's ALPN into the config, so the loop assigned the extension its own protocols. The reality ClientHello keeps carrying the fingerprint's ALPN, as in Xray-core. --- common/tls/reality_client.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/common/tls/reality_client.go b/common/tls/reality_client.go index 2ef71854..84cbf0f4 100644 --- a/common/tls/reality_client.go +++ b/common/tls/reality_client.go @@ -146,15 +146,6 @@ func (e *RealityClientConfig) ClientHandshake(ctx context.Context, conn net.Conn return nil, err } - if len(uConfig.NextProtos) > 0 { - for _, extension := range uConn.Extensions { - if alpnExtension, isALPN := extension.(*utls.ALPNExtension); isALPN { - alpnExtension.AlpnProtocols = uConfig.NextProtos - break - } - } - } - hello := uConn.HandshakeState.Hello hello.SessionId = make([]byte, 32) copy(hello.Raw[39:], hello.SessionId)