Skip to content

[Feature]: 支持RFC 9369:QUIC V2版本 #835

Description

@qisefengzheng

Before request a new feature

  • I have searched the issues of this repository and believe that this is not a duplicate.

Describe the feature you'd like supported

RFC 9000 / RFC 9369 要求
RFC 9369定义了QUIC V2,版本号为0x6b3343cf
QUIC V2使用不同的长包头类型码
xquic实现问题
xqc_defs.c:9-22:

const uint32_t xqc_proto_version_value[XQC_VERSION_MAX] = {
0xFFFFFFFF, /* XQC_IDRAFT_INIT_VER /
0x00000001, / XQC_VERSION_V1 /
0xFF00001D, / XQC_IDRAFT_VER_29 /
0x00000000, / XQC_IDRAFT_VER_NEGOTIATION */
};
xquic仅支持QUIC V1(0x00000001)和Draft-29(0xFF00001D),不支持QUIC V2(0x6b3343cf)。

ngtcp2参考实现
[ngtcp2_pkt.c:2496-2504
int ngtcp2_is_supported_version(uint32_t version) {
switch (version) {
case NGTCP2_PROTO_VER_V1: // 0x00000001
case NGTCP2_PROTO_VER_V2: // 0x6b3343cf
return 1;
default:
return 0;
}
}
ngtcp2同时支持V1和V2,包括V2的长包头类型码映射。
修复建议
在xqc_proto_version_value中添加V2版本号
在xqc_proto_version_t枚举中添加XQC_VERSION_V2
实现V2的长包头类型码映射

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions