microsoft/msquic

GitHub: microsoft/msquic

MsQuic 是微软维护的跨平台 QUIC 协议 C 实现,为需要高性能、低延迟传输的应用提供底层网络通信能力。

Stars: 4740 | Forks: 677

MsQuic logo

[![Discord](https://img.shields.io/discord/827744285595271168?label=Discord&logo=discord&logoColor=white&color=7289DA)](https://discord.gg/YGAtCwTSsc) [![文档](https://img.shields.io/static/v1?label=Documentation&message=API&color=yellow)](https://microsoft.github.io/msquic/msquicdocs/docs/API.html) [![性能仪表板](https://img.shields.io/static/v1?label=Performance&message=Dashboard&color=blue)](https://microsoft.github.io/netperf/dist/) [![codecov](https://codecov.io/github/microsoft/msquic/branch/main/graph/badge.svg?token=xAjIMDn7wy)](https://codecov.io/github/microsoft/msquic) [![crates.io](https://img.shields.io/crates/v/msquic)](https://crates.io/crates/msquic) [![nuget](https://img.shields.io/nuget/vpre/Microsoft.Native.Quic.MsQuic.Schannel?style=plastic)](https://www.nuget.org/profiles/msquic) [![CII 最佳实践](https://bestpractices.coreinfrastructure.org/projects/4846/badge)](https://bestpractices.coreinfrastructure.org/projects/4846) MsQuic 是 [IETF QUIC](https://datatracker.ietf.org/wg/quic/about/) 协议的 Microsoft 实现。 它是一个跨平台的库,使用 C 语言编写,旨在作为通用的 QUIC 库。MsQuic 还提供了 C++ API 封装类,并为 [Rust](https://docs.rs/msquic/latest/msquic/) 和 C# 暴露了互操作层。 ## 协议特性 [![](https://img.shields.io/static/v1?label=RFC&message=9000&color=brightgreen)](https://tools.ietf.org/html/rfc9000) [![](https://img.shields.io/static/v1?label=RFC&message=9001&color=brightgreen)](https://tools.ietf.org/html/rfc9001) [![](https://img.shields.io/static/v1?label=RFC&message=9002&color=brightgreen)](https://tools.ietf.org/html/rfc9002) [![](https://img.shields.io/static/v1?label=RFC&message=9221&color=brightgreen)](https://tools.ietf.org/html/rfc9221) [![](https://img.shields.io/static/v1?label=RFC&message=9287&color=brightgreen)](https://tools.ietf.org/html/rfc9287) [![](https://img.shields.io/static/v1?label=RFC&message=9368&color=brightgreen)](https://tools.ietf.org/html/rfc9368) [![](https://img.shields.io/static/v1?label=RFC&message=9369&color=brightgreen)](https://tools.ietf.org/html/rfc9369) [![](https://img.shields.io/static/v1?label=Draft&message=Load%20Balancers&color=blue)](https://tools.ietf.org/html/draft-ietf-quic-load-balancers) [![](https://img.shields.io/static/v1?label=Draft&message=ACK%20Frequency&color=blue)](https://tools.ietf.org/html/draft-ietf-quic-ack-frequency) [![](https://img.shields.io/static/v1?label=Draft&message=Disable%20Encryption&color=blueviolet)](https://tools.ietf.org/html/draft-banks-quic-disable-encryption) [![](https://img.shields.io/static/v1?label=Draft&message=Performance&color=blueviolet)](https://tools.ietf.org/html/draft-banks-quic-performance) [![](https://img.shields.io/static/v1?label=Draft&message=CIBIR&color=blueviolet)](https://tools.ietf.org/html/draft-banks-quic-cibir) [![](https://img.shields.io/static/v1?label=Draft&message=Timestamps&color=blueviolet)](https://tools.ietf.org/html/draft-huitema-quic-ts) [![](https://img.shields.io/static/v1?label=Draft&message=ReliableReset&color=blueviolet)](https://datatracker.ietf.org/doc/draft-ietf-quic-reliable-stream-reset/) 与现有的“基于 TCP 的 TLS”场景相比,QUIC 具有以下诸多优势: * 所有数据包都经过加密,且握手通过 TLS 1.3 进行身份验证。 * 并行传输(可靠和不可靠的)应用程序数据流。 * 在第一个往返时间(0-RTT)内交换应用程序数据。 * 改进的拥塞控制和丢包恢复机制。 * 即使客户端的 IP 地址或端口发生变化,连接依然能够存活。 * 无状态负载均衡。 * 易于扩展以支持新功能和特性。 ## 库特性 MsQuic 具有以下几个区别于其他 QUIC 实现的特性: * 针对客户端和服务器进行了优化。 * 针对最大吞吐量和最小延迟进行了优化。 * 异步 IO。 * 支持接收端扩展([RSS](https://docs.microsoft.com/en-us/windows-hardware/drivers/network/introduction-to-receive-side-scaling))。 * 支持 UDP 发送和接收合并。 * 通过 [XDP](https://github.com/microsoft/xdp-for-windows?tab=readme-ov-file#xdp-for-windows) 绕过内核网络栈。 # 文档 * 有关平台支持的详细信息,请参阅[平台文档](./docs/Platforms.md)。 * 有关发布详情和受支持的版本,请参阅[发布文档](./docs/Release.md)。 * 有关性能数据,请参阅[性能仪表板](https://aka.ms/msquicperformance)。 * 有关构建该库的信息,请参阅[构建文档](./docs/BUILD.md)。 * 有关测试该库的信息,请参阅[测试文档](./docs/TEST.md)。 * 有关使用 API 的信息,请参阅 [API 文档](./docs/API.md)或[示例](./src/tools/sample/sample.c)。 * 有关运行示例服务器和客户端应用程序的信息,请参阅[快速入门指南](./docs/Sample.md)。 * 有关部署 QUIC 的信息,请参阅[部署文档](./docs/Deployment.md)。 * 有关诊断问题的信息,请参阅[诊断文档](./docs/Diagnostics.md)和[故障排除指南](./docs/TroubleShootingGuide.md)。 * 有关其他常见问题,请参阅[常见问题解答](./docs/FAQ.md)。 * 有关贡献者指南和内部设计文档,请参阅[贡献者文档](./docs/contrib)。 # 贡献 有关如何贡献的信息,请参阅我们的[贡献指南](./.github/CONTRIBUTING.md)。 如果你正在寻找合适的切入点,欢迎查看我们的[新手友好任务](https://github.com/microsoft/msquic/labels/good%20first%20issue)列表。 如果你只是想交流,欢迎来 [Discord](https://discord.gg/YGAtCwTSsc) 与我们聊天。
标签:HTTP 参数枚举, QUIC, 内核驱动, 可视化界面, 客户端加密, 底层开发, 网络协议, 网络通信库