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 a non-empty 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'