Skip to content
github-actions[bot] edited this page Jul 16, 2026 · 8 revisions

wknet

面向 Windows 内核驱动的纯内核态 HTTP/HTTPS/WebSocket/SSE 客户端库。

传输主路径为 WSK,密码学主路径为内核态 CNG/BCrypt;不依赖 WinHTTP、WinINet 或 SChannel。公共 API 命名空间:wknet::httpwknet::websocketwknet::ssewknet::cryptowknet::codec

定位

wknet 是内核态 HTTP/HTTPS/WebSocket/SSE 客户端。面向需要在驱动里发起请求、并希望安全默认值明确的场景;HTTP/1.1、HTTP/2、HTTP/3 共用同一产品 API。

当前不提供 HTTP 服务端或入站 request parser,也不内置系统 CA。QUIC 迁移、WebTransport 等能力尚未支持,详见 能力边界

集成要点

  • 同步路径在 PASSIVE_LEVEL 调用;公共句柄为堆对象,Create 与 Close / Release 成对使用。
  • 信任锚、CA 包、pin、撤销证据由调用方提供;主机名校验不回退 CN。
  • Trace 默认 Off;HTTP/3 默认 Auto,从已认证响应的 Alt-Svc 学习。

从这里开始

  1. 构建 — 编出 wknetlib.lib
  2. 第一个请求 — 最小 GET / POST
  3. 集成要点 — 链接、生命周期、信任
  4. 能力边界 — 支持范围与限制

任务范例见 Cookbook;函数签名见 API 总览


English

wknet

A pure kernel-mode HTTP/HTTPS/WebSocket/SSE client library for Windows drivers.

Transport main path is WSK; cryptography main path is kernel CNG/BCrypt. No WinHTTP, WinINet, or SChannel. Public API namespaces: wknet::http, wknet::websocket, wknet::sse, wknet::crypto, wknet::codec.

Scope

wknet is a kernel-mode HTTP/HTTPS/WebSocket/SSE client. It is for drivers that issue requests and want explicit security defaults, with one product API across HTTP/1.1, HTTP/2, and HTTP/3.

It does not provide an HTTP server or inbound request parser, and it does not ship a system CA store. Features such as QUIC migration and WebTransport are not supported today; see the capability matrix.

Integration notes

  • Call sync paths at PASSIVE_LEVEL. Public handles are heap objects; pair Create with Close / Release.
  • Trust anchors, CA bundles, pins, and revocation evidence are caller-supplied. Hostname verification does not fall back to CN.
  • Trace defaults to Off. HTTP/3 defaults to Auto and learns from authenticated Alt-Svc.

Start here

  1. Build — produce wknetlib.lib
  2. First request — minimal GET / POST
  3. Integration notes — link, lifetime, trust
  4. Capability matrix — support scope and limits

Recipes: Cookbook. Signatures: API overview.

Clone this wiki locally