|
13 | 13 | </p> |
14 | 14 |
|
15 | 15 | <p align="center" class="hidden"> |
16 | | - <a href="./README_EN.md">English</a> |
| 16 | + <a href="./README_ZH.md">简体中文</a> |
17 | 17 | </p> |
18 | 18 |
|
19 | | -## 📖 介绍 |
| 19 | +## 📖 Introduction |
20 | 20 |
|
21 | | -一站式 KMS 工具箱,集成了 KMS 激活脚本生成、KMS 服务器检测、KMS 服务器状态监控等功能。 |
| 21 | +An all-in-one KMS toolbox that integrates features such as KMS activation script generation, KMS server detection, and KMS server status monitoring. |
22 | 22 |
|
23 | | -该项目最早诞生于 2020 年 4 月,首发在 [Hostloc 论坛](https://hostloc.com/thread-669158-1-1.html),之前仅仅只是一个用来生成 KMS 激活脚本的小工具。上大学的时候我在学校负责维护教学楼和机房的电脑设备,平日里经常需要重装各种各样版本的操作系统,这个小工具提高了激活操作系统的效率。于是在 2022 年 6 月,我将这个小工具翻出来,使用许多新技术对其进行了重构,再一次发布到了 [Hostloc 论坛](https://hostloc.com/thread-1026408-1-1.html),得到了许多大佬的关注和支持。 |
| 23 | +## 📦 Project Demo |
24 | 24 |
|
25 | | -后来的一段时间里也会偶尔更新一些功能,但一直都没有很完善,直到前些时候收到了两个特别的 issues「[#25](https://github.com/ikxin/kms-tools/issues/25)、[#26](https://github.com/ikxin/kms-tools/issues/26)」,其中有一个还是非中文语言发起的,我没有想到一个小小的项目能够得到海外朋友的关注。作为我开源的第一款「处女作」,我决定将其继续开发和维护下去。 |
| 25 | +### Full-Stack Version |
26 | 26 |
|
27 | | -原先的版本是一个纯前端的工具,为了实现 KMS 检测和 KMS 监控等功能,我使用 Bun + Elysia 写了一个后端服务,将整个项目区分为纯前端版本和全栈版本,前端版本可以调用 [kms.ikxin.com](https://kms.ikxin.com) 的 API 接口,而全栈版本则可以独立部署所有功能,甚至包含了 Vlmcsd 来作为 KMS 激活服务器。 |
| 27 | +Thanks to [Zebaur](https://zeabur.com/referral?referralCode=ikxin&utm_source=ikxin&utm_campaign=oss) for providing services for project deployment. |
28 | 28 |
|
29 | | -## 📦 在线使用 |
| 29 | +- [kms.ikxin.com](https://kms.ikxin.com) |
30 | 30 |
|
31 | | -### 全栈版本 |
| 31 | +### Frontend Version |
32 | 32 |
|
33 | | -- 官网地址: [kms.ikxin.com](https://kms.ikxin.com) |
34 | | - |
35 | | -### 纯前端版本 |
| 33 | +By default, it calls the API interface of [kms.ikxin.com](https://kms.ikxin.com), but you can also deploy your own backend service. |
36 | 34 |
|
37 | 35 | - Cloudflare: [kmstools.pages.dev](https://kmstools.pages.dev) |
38 | 36 | - Vercel: [kmstools.vercel.app](https://kmstools.vercel.app) |
| 37 | +- Netlify: [kms-tools.netlify.app](https://kms-tools.netlify.app) |
39 | 38 |
|
40 | | -## 🌈 功能预览 |
| 39 | +## 🌈 Feature Preview |
41 | 40 |
|
42 | | -| KMS 激活脚本生成 | KMS 服务器检测 | KMS 服务器状态监控 | |
| 41 | +| KMS Activation Script Generation | KMS Server Detection | KMS Server Status Monitoring | |
43 | 42 | | ------------------------------------- | ---------------------------------- | ------------------------------------ | |
44 | 43 | |  |  |  | |
45 | 44 |
|
46 | | -## 👀 历史版本 |
| 45 | +## ✨ Tech Stack |
47 | 46 |
|
48 | | -| v1.2.0 | v1.0.0 | v0.1.5 | |
49 | | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | |
50 | | -|  |  |  | |
| 47 | +- [Nuxt](https://github.com/nuxt/nuxt) - Full-stack web application framework based on Vue.js |
| 48 | +- [Vue.js](https://github.com/vuejs/core) - Progressive JavaScript framework |
| 49 | +- [Nitro](https://github.com/nitrojs/nitro) - High-performance web server framework based on unjs/h3 |
| 50 | +- [Vite](https://github.com/vitejs/vite) - Fast development server and modern build tool |
| 51 | +- [VueUse](https://github.com/vueuse/vueuse) - Collection of utility functions based on the Composition API |
| 52 | +- [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss) - Utility-first CSS framework |
| 53 | +- [Arco Design Vue](https://github.com/arco-design/arco-design-vue) - Enterprise-level product design system by ByteDance |
| 54 | +- [Nuxt I18n](https://github.com/nuxt-modules/i18n) - Internationalization support plugin for Nuxt |
51 | 55 |
|
52 | | -## ✨ 技术栈 |
| 56 | +## 📦 Deployment |
53 | 57 |
|
54 | | -### 后端 |
| 58 | +### Full-Stack Version |
55 | 59 |
|
56 | | -- <img src="./src/assets/icons/logos/bun.svg" /> [Bun](https://github.com/oven-sh/bun) - 用于 JavaScript 和 TypeScript 应用程序的一体化工具包 |
57 | | -- <img src="./src/assets/icons/logos/drizzle.svg" /> [Drizzle ORM](https://github.com/drizzle-team/drizzle-orm) - 下一代的无头 TypeScript ORM 框架 |
58 | | -- <img src="./src/assets/icons/logos/elysia.svg" /> [Elysia](https://github.com/elysiajs/elysia) - 符合人体工程学的 Web 框架,用于使用 Bun 构建后端服务器 |
| 60 | +#### Zeabur Deployment |
59 | 61 |
|
60 | | -### 前端 |
| 62 | +[](https://zeabur.com/templates/TXR0D9) |
61 | 63 |
|
62 | | -- <img src="./src/assets/icons/logos/vue.svg" /> [Vue.js](https://github.com/vuejs/core) - 构建用户界面的 JavaScript 框架 |
63 | | -- <img src="./src/assets/icons/logos/vite.svg" /> [Vite](https://github.com/vitejs/vite) - 下一代的前端工程构建工具 |
64 | | -- <img src="./src/assets/icons/logos/arco.svg" /> [Arco Design Vue](https://github.com/arco-design/arco-design-vue) - ByteDance 开发的企业级产品设计系统 |
65 | | -- <img src="./src/assets/icons/logos/vue-router.svg" /> [Vue Router](https://github.com/vuejs/vue-router) - Vue.js 核心团队开发的路由组件 |
66 | | -- <img src="./src/assets/icons/logos/pinia.svg" /> [Pinia](https://github.com/vuejs/pinia) - 类型安全、可扩展性以及模块化设计的状态管理库 |
67 | | -- <img src="./src/assets/icons/logos/unocss.svg" /> [UnoCSS](https://github.com/unocss/unocss) - 即时的按需加载原子 CSS 引擎 |
68 | | -- <img src="./src/assets/icons/logos/vueuse.svg" /> [VueUse](https://github.com/vueuse/vueuse) - 基于 Composition API 的实用函数集合 |
69 | | -- <img src="./src/assets/icons/logos/vue-i18n.svg" /> [Vue I18n](https://github.com/intlify/vue-i18n-next) - I18n 国际化语言支持 |
70 | | -- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) - 自动按需导入 Composition API 的插件 |
71 | | -- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) - 自动按需导入 Vue 组件的插件 |
72 | | -- <img src="./src/assets/icons/logos/unjs.svg" /> [unplugin-vue-router](https://github.com/posva/unplugin-vue-router) - Vue Router 自动加载基于文件的路由系统 |
73 | | -- <img src="./src/assets/icons/logos/markdown.svg" /> [unplugin-vue-markdown](https://github.com/unplugin/unplugin-vue-markdown) - Markdown 文档支持 |
| 64 | +#### Docker Deployment |
74 | 65 |
|
75 | | -## 📦 本地构建 |
| 66 | +```bash |
| 67 | +docker run -d --name kms-tools -p 3000:3000 ikxin/kms-tools |
| 68 | +``` |
76 | 69 |
|
77 | | -不管是全栈版本还是纯前端版本,都需要依赖 Bun 来进行构建,使用以下脚本在本地安装 Bun 环境。 |
| 70 | +#### Manual Deployment |
78 | 71 |
|
79 | | -Linux & macOS: |
| 72 | +1. Clone the project repository to your local machine and install dependencies |
80 | 73 |
|
81 | 74 | ```bash |
82 | | -curl -fsSL https://bun.sh/install | bash |
| 75 | +git clone https://github.com/ikxin/kms-tools.git |
| 76 | +cd kms-tools && pnpm install |
83 | 77 | ``` |
84 | 78 |
|
85 | | -Windows: |
| 79 | +2. Build the project |
86 | 80 |
|
87 | 81 | ```bash |
88 | | -powershell -c "irm bun.sh/install.ps1 | iex" |
| 82 | +pnpm run build |
89 | 83 | ``` |
90 | 84 |
|
91 | | -接下来将项目克隆到本地,然后执行命令安装依赖 |
| 85 | +3. Start the server (listening on port `3000` by default) |
92 | 86 |
|
93 | 87 | ```bash |
94 | | -git clone https://github.com/ikxin/kms-tools.git |
95 | | -cd kms-tools && bun install |
| 88 | +node .output/server/index.mjs |
96 | 89 | ``` |
97 | 90 |
|
98 | | -### 全栈版本 |
99 | | - |
100 | | -1. 创建 MySQL 数据库,使用以下 SQL 创建表的结构 |
101 | | - |
102 | | -```sql |
103 | | -CREATE TABLE `logs` ( |
104 | | - `id` int AUTO_INCREMENT NOT NULL, |
105 | | - `host` text NOT NULL, |
106 | | - `delay` int NOT NULL DEFAULT 0, |
107 | | - `content` text, |
108 | | - `status` boolean NOT NULL DEFAULT false, |
109 | | - `created_at` timestamp NOT NULL, |
110 | | - CONSTRAINT `logs_id` PRIMARY KEY(`id`) |
111 | | -); |
112 | | ---> statement-breakpoint |
113 | | -CREATE TABLE `server` ( |
114 | | - `id` int AUTO_INCREMENT NOT NULL, |
115 | | - `host` text NOT NULL, |
116 | | - `port` int NOT NULL DEFAULT 1688, |
117 | | - `total` int NOT NULL DEFAULT 0, |
118 | | - `success` int NOT NULL DEFAULT 0, |
119 | | - `fail` int NOT NULL DEFAULT 0, |
120 | | - `delay` float NOT NULL DEFAULT 0, |
121 | | - `rate` float NOT NULL DEFAULT 0, |
122 | | - `updated_at` timestamp, |
123 | | - `created_at` timestamp, |
124 | | - CONSTRAINT `server_id` PRIMARY KEY(`id`) |
125 | | -); |
| 91 | +### Frontend Version |
| 92 | + |
| 93 | +#### Cloudflare Deployment |
| 94 | + |
| 95 | +1. Fork this project to your own repository |
| 96 | + |
| 97 | +2. Create a project on Cloudflare Pages and select the forked repository |
| 98 | + |
| 99 | +3. Set the build command |
| 100 | + |
| 101 | +```bash |
| 102 | +pnpm run generate |
126 | 103 | ``` |
127 | 104 |
|
128 | | -2. 将 `.env.example` 文件重命名为 `.env`,并修改其中的配置项 |
| 105 | +4. Configure environment variables |
| 106 | + |
| 107 | +| Name | Value | |
| 108 | +| --------------------- | ----------------------- | |
| 109 | +| `NODE_VERSION` | `22` | |
| 110 | +| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | |
| 111 | + |
| 112 | +5. Deploy the project |
| 113 | + |
| 114 | +#### Vercel Deployment |
| 115 | + |
| 116 | +1. Fork this project to your own repository |
129 | 117 |
|
130 | | -```ini |
131 | | -ENABLE_VLMCSD = false # 是否启用 Vlmcsd 服务 |
132 | | -PORT = 3000 # 服务端口 |
133 | | -DATABASE_URL = 'mysql://root:password@localhost:3306/database' # 数据库连接地址 |
| 118 | +2. Create a project on Vercel and select the forked repository |
| 119 | + |
| 120 | +3. Set the build command |
| 121 | + |
| 122 | +```bash |
| 123 | +pnpm run generate |
134 | 124 | ``` |
135 | 125 |
|
136 | | -3. 运行以下命令启动服务 |
| 126 | +4. Configure environment variables |
| 127 | + |
| 128 | +| Name | Value | |
| 129 | +| --------------------- | ----------------------- | |
| 130 | +| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | |
| 131 | + |
| 132 | +5. Deploy the project |
| 133 | + |
| 134 | +#### Netlify Deployment |
| 135 | + |
| 136 | +1. Fork this project to your own repository |
| 137 | + |
| 138 | +2. Create a project on Netlify and select the forked repository |
| 139 | + |
| 140 | +3. Set the build command |
137 | 141 |
|
138 | 142 | ```bash |
139 | | -bun run service |
| 143 | +pnpm run generate |
140 | 144 | ``` |
141 | 145 |
|
142 | | -### 纯前端版本 |
| 146 | +4. Configure environment variables |
| 147 | + |
| 148 | +| Name | Value | |
| 149 | +| --------------------- | ----------------------- | |
| 150 | +| `NUXT_PUBLIC_API_URL` | `https://kms.ikxin.com` | |
| 151 | + |
| 152 | +5. Deploy the project |
143 | 153 |
|
144 | | -1. 使用以下命令构建项目 |
| 154 | +#### Manual Deployment |
| 155 | + |
| 156 | +1. Clone the project repository to your local machine and install dependencies |
145 | 157 |
|
146 | 158 | ```bash |
147 | | -bun run build |
| 159 | +git clone https://github.com/ikxin/kms-tools.git |
| 160 | +cd kms-tools && pnpm install |
148 | 161 | ``` |
149 | 162 |
|
150 | | -2. 运行以下命令启动服务 |
| 163 | +2. Build the project |
151 | 164 |
|
152 | 165 | ```bash |
153 | | -npx serve dist |
| 166 | +pnpm run generate |
154 | 167 | ``` |
155 | 168 |
|
156 | | -## ⭐ 星星 |
| 169 | +3. After building, upload the files from the `.output/public` directory to your server |
| 170 | + |
| 171 | +## ⭐ Stars |
157 | 172 |
|
158 | 173 | <img class="w-full" src="https://starchart.cc/ikxin/kms-tools.svg" /> |
159 | 174 |
|
160 | | -## 🧑💻 作者 |
| 175 | +## 🧑💻 Author |
161 | 176 |
|
162 | 177 | Code with ❤️ by [一纸忘忧](https://blog.ikxin.com '一纸忘忧') |
163 | 178 |
|
164 | | -## 📜 开源协议 |
| 179 | +## 📜 License |
165 | 180 |
|
166 | | -[MIT License](./LICENSE 'MIT License') Copyright (c) 2022 ~ Present |
| 181 | +[MIT License](./LICENSE 'MIT License') © 2022 ~ Present |
0 commit comments