询问
哪个最新的(截至 2025 年 4 月) RFC 定义了 WebRTC ICE 候选数据格式?
背景
RFC 5245 定义了 ICE 候选数据格式:
candidate:842163049 1 udp 1677729535 192.168.1.2 61734 typ srflx raddr 10.0.0.2 rport 54321
该格式可以通过 RFC 5245 15.1 清楚地识别。“candidate”属性:
15.1. "candidate" Attribute
The candidate attribute is a media-level attribute only. It contains
a transport address for a candidate that can be used for connectivity
checks.
The syntax of this attribute is defined using Augmented BNF as
defined in RFC 5234 [RFC5234]:
candidate-attribute = "candidate" ":" foundation SP component-id SP
transport SP
priority SP
connection-address SP ;from RFC 4566
port ;port from RFC 4566
SP cand-type
[SP rel-addr]
[SP rel-port]
*(SP extension-att-name SP
extension-att-value)
foundation = 1*32ice-char
component-id = 1*5DIGIT
transport = "UDP" / transport-extension
transport-extension = token ; from RFC 3261
priority = 1*10DIGIT
cand-type = "typ" SP candidate-types
candidate-types = "host" / "srflx" / "prflx" / "relay" / token
rel-addr = "raddr" SP connection-address
rel-port = "rport" SP port
extension-att-name = byte-string ;from RFC 4566
extension-att-value = byte-string
ice-char = ALPHA / DIGIT / "+" / "/"
然而,它已被弃用并且正在寻找最新的 RFC 对其进行定义。
RFC 8445 5.3. 交换候选信息具有类似的信息,但并不明确,例如没有给出在 ICE 候选数据中使用typType: The type of the candidate.
的线索。
5.3. Exchanging Candidate Information
ICE agents (initiating and responding) need the following information
about candidates to be exchanged. Each ICE usage MUST define how the
information is exchanged with the using protocol. This section
describes the information that needs to be exchanged.
Candidates: One or more candidates. For each candidate:
Address: The IP address and transport protocol port of the
candidate.
Transport: The transport protocol of the candidate. This MAY be
omitted if the using protocol only runs over a single transport
protocol.
Foundation: A sequence of up to 32 characters.
Component ID: The component ID of the candidate. This MAY be
omitted if the using protocol does not use the concept of
components.
Priority: The 32-bit priority of the candidate.
Type: The type of the candidate.
Related Address and Port: The related IP address and port of the
candidate. These MAY be omitted or set to invalid values if
the agent does not want to reveal them, e.g., for privacy
reasons.
Extensibility Parameters: The using protocol might define means
for adding new per-candidate ICE parameters in the future.
“SDP”定义从 RFC 5245 移至RFC 8839,标题为“交互式连接建立 (ICE) 的会话描述协议 (SDP) 提供/应答程序”。
请注意,浏览器实现仍然主要使用 RFC 5245。