|
1 | | -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# KernelSU Keyring |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +开发者身份认证管理系统 (X.509 PKI) |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +## 项目简介 |
| 6 | + |
| 7 | +KernelSU Keyring 是一个基于 X.509 PKI 的开发者身份认证管理系统,提供密钥对生成、公钥提交、证书查询和证书吊销等功能。所有加密操作均在客户端完成,确保私钥安全。 |
| 8 | + |
| 9 | +## 主要功能 |
| 10 | + |
| 11 | +### 1. 生成密钥对 |
| 12 | +- 支持 P-256 (NIST P-256 / secp256r1) 和 P-384 (NIST P-384 / secp384r1) 椭圆曲线 |
| 13 | +- 使用 Web Crypto API 在客户端生成密钥对 |
| 14 | +- 自动下载私钥文件 |
| 15 | +- 生成公钥指纹 (SHA-256) |
| 16 | +- 自动填充公钥到提交表单 |
| 17 | + |
| 18 | +### 2. 提交公钥 |
| 19 | +- 提交公钥到 GitHub Issue 申请证书签发 |
| 20 | +- 支持从文件导入公钥 |
| 21 | +- 安全提示:永远不要提交私钥 |
| 22 | + |
| 23 | +### 3. 查询证书 |
| 24 | +- 通过证书指纹查询官方密钥库中的证书 |
| 25 | +- 支持从证书文件导入并验证 |
| 26 | +- 显示证书详细信息(CN、序列号、签发者、有效期等) |
| 27 | + |
| 28 | +### 4. 吊销证书 |
| 29 | +- 创建证书吊销请求 |
| 30 | +- 支持多种吊销原因(证书泄露、私钥丢失、证书更替) |
| 31 | + |
| 32 | +## 技术栈 |
| 33 | + |
| 34 | +- **框架**: Next.js 15 (App Router) |
| 35 | +- **UI 库**: React 19, Radix UI, Tailwind CSS |
| 36 | +- **加密**: Web Crypto API, node-forge |
| 37 | +- **表单**: React Hook Form, Zod |
| 38 | +- **国际化**: 支持中英文双语 |
| 39 | + |
| 40 | +## 开发 |
| 41 | + |
| 42 | +### 前置要求 |
| 43 | + |
| 44 | +- [Bun](https://bun.sh/) >= 1.0 |
| 45 | + |
| 46 | +### 安装依赖 |
| 47 | + |
| 48 | +```bash |
| 49 | +bun install |
| 50 | +``` |
| 51 | + |
| 52 | +### 启动开发服务器 |
6 | 53 |
|
7 | 54 | ```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
14 | 55 | bun dev |
15 | 56 | ``` |
16 | 57 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 58 | +打开 [http://localhost:3000](http://localhost:3000) 查看应用。 |
| 59 | + |
| 60 | +### 构建生产版本 |
| 61 | + |
| 62 | +```bash |
| 63 | +bun run build |
| 64 | +``` |
| 65 | + |
| 66 | +## 项目结构 |
| 67 | + |
| 68 | +``` |
| 69 | +website/ |
| 70 | +├── public/ # 静态资源 |
| 71 | +│ ├── favicon.ico # 网站图标 |
| 72 | +│ └── logo.svg # KernelSU Logo |
| 73 | +├── src/ |
| 74 | +│ ├── app/ # Next.js App Router |
| 75 | +│ │ ├── layout.tsx # 根布局 |
| 76 | +│ │ └── page.tsx # 首页 |
| 77 | +│ ├── components/ # React 组件 |
| 78 | +│ │ ├── ui/ # UI 组件库 |
| 79 | +│ │ └── keyring-app.tsx # 主应用组件 |
| 80 | +│ └── lib/ # 工具库 |
| 81 | +│ ├── locales.ts # 国际化文本 |
| 82 | +│ └── utils.ts # 工具函数 |
| 83 | +└── README.md |
| 84 | +``` |
| 85 | + |
| 86 | +## 安全特性 |
| 87 | + |
| 88 | +- ✅ 所有加密操作在客户端完成 |
| 89 | +- ✅ 私钥永不离开用户设备 |
| 90 | +- ✅ 使用 Web Crypto API 标准加密 |
| 91 | +- ✅ 公钥指纹用于身份验证 |
| 92 | +- ✅ 支持证书吊销机制 |
18 | 93 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 94 | +## 浏览器兼容性 |
20 | 95 |
|
21 | | -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 96 | +需要支持以下特性的现代浏览器: |
| 97 | +- Web Crypto API |
| 98 | +- ES6+ |
| 99 | +- localStorage |
22 | 100 |
|
23 | | -## Learn More |
| 101 | +推荐使用: |
| 102 | +- Chrome 90+ |
| 103 | +- Firefox 88+ |
| 104 | +- Safari 14+ |
| 105 | +- Edge 90+ |
24 | 106 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 107 | +## 许可证 |
26 | 108 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 109 | +本项目遵循 KernelSU 项目的许可证。 |
29 | 110 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 111 | +## 贡献 |
31 | 112 |
|
32 | | -## Deploy on Vercel |
| 113 | +欢迎提交 Issue 和 Pull Request! |
33 | 114 |
|
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 115 | +## 相关链接 |
35 | 116 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 117 | +- [KernelSU](https://github.com/tiann/KernelSU) |
| 118 | +- [KernelSU Modules Repo](https://github.com/KernelSU-Modules-Repo) |
0 commit comments