Skip to content
x500x edited this page Jun 18, 2026 · 8 revisions

KernelHttp Wiki

面向 Windows 内核驱动的纯内核态 HTTP/HTTPS 客户端库 A pure kernel-mode HTTP/HTTPS client library for Windows kernel drivers

English | 简体中文


简体中文

KernelHttp 是一个纯内核态的 HTTP/HTTPS 客户端库,专为 Windows 内核驱动开发设计。它从底层开始构建,实现了内核可用的客户端协议栈:HTTP/1.1、HTTP/2、WebSocket,以及 TLS 1.2/1.3 握手、记录保护和证书验证。

  • 🔒 纯内核态:不依赖 WinHTTP / WinINet / SChannel
  • 🌐 WSK 传输 + 🔐 CNG/BCrypt 密码学
  • 🎯 两层 API:高层 khttp 与底层 engine
  • 🔄 连接池、异步、证书锁定、响应解码

📚 导航

页面 说明
快速开始 环境要求、编译成 lib、集成到驱动
构建与测试 构建脚本、测试套件、TLS 互通矩阵
能力边界 各协议已支持能力与边界(必读
架构总览 分层架构与核心抽象
高层 API khttp 命名空间
底层 API engine / Kh* API
配置项 SessionConfig、连接策略、地址族
TLS 与证书 TLS 策略、证书锁定、ALPN
NTSTATUS 错误码 常见错误码与处理
Cookbook 样例 生产级实战范例
常见问题 FAQ 设计取舍与使用约束
贡献指南 代码风格与提交规范

English

KernelHttp is a pure kernel-mode HTTP/HTTPS client library designed specifically for Windows kernel driver development. Built from the ground up, it implements a kernel-friendly client protocol stack: HTTP/1.1, HTTP/2, WebSocket, and TLS 1.2/1.3 handshake, record protection, and certificate validation.

  • 🔒 Pure kernel-mode: no dependency on WinHTTP / WinINet / SChannel
  • 🌐 WSK transport + 🔐 CNG/BCrypt cryptography
  • 🎯 Two-layer API: high-level khttp and low-level engine
  • 🔄 Connection pool, async, certificate pinning, response decoding

📚 Navigation

Page Description
Getting Started Requirements, build the lib, integrate into a driver
Build & Test Build scripts, test suites, TLS interop matrix
Capability Matrix Supported capabilities and boundaries (read first)
Architecture Layered architecture and core abstractions
High-Level API The khttp namespace
Low-Level API The engine / Kh* API
Configuration SessionConfig, connection policy, address family
TLS & Certificates TLS policy, pinning, ALPN
NTSTATUS Reference Common error codes and handling
Cookbook Production-grade samples
FAQ Design trade-offs and usage constraints
Contributing Code style and commit conventions

Clone this wiki locally