sessionOptions.alpn
- 类型:<string> (客户端) | 字符串数组 (服务器)
ALPN(应用层协议协商)标识符。
🌐 The ALPN (Application-Layer Protocol Negotiation) identifier(s).
对于客户端会话,这是一个指定客户端想要使用的协议的单个字符串(例如 'h3')。
🌐 For client sessions, this is a single string specifying the protocol
the client wants to use (e.g. 'h3').
对于 服务器 会话,这是服务器支持的协议名称数组,按照优先顺序排列(例如 ['h3', 'h3-29'])。在 TLS 握手期间,服务器会从其列表中选择客户端也支持的第一个协议。
🌐 For server sessions, this is an array of protocol names in preference
order that the server supports (e.g. ['h3', 'h3-29']). During the TLS
handshake, the server selects the first protocol from its list that the
client also supports.
协商的 ALPN 决定会话使用哪种应用实现。'h3' 和 'h3-*' 变体选择 HTTP/3 应用;所有其他值选择默认应用。
🌐 The negotiated ALPN determines which Application implementation is used
for the session. 'h3' and 'h3-*' variants select the HTTP/3
application; all other values select the default application.
默认:'h3'
🌐 Default: 'h3'