Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ NUXT_PUBLIC_API_URL=https://kms.ikxin.com
NUXT_PUBLIC_I18N_BASE_URL=https://kms.ikxin.com
NUXT_MONITOR_LIST=kms.org.cn,win.freekms.cn
NUXT_MONITOR_INTERVAL=10

CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_KV_NAMESPACE_ID=
CLOUDFLARE_API_TOKEN=
35 changes: 16 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,30 @@ name: CI

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- main

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
node-version: lts/*

- name: Install dependencies
run: pnpm install
- uses: pnpm/action-setup@v6
with:
cache: true
run_install: |
- args: [--frozen-lockfile]

- name: Build
run: pnpm run build
- run: pnpm build
14 changes: 7 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
ikxin/kms-tools
Expand All @@ -27,26 +27,26 @@ jobs:
type=raw,value=latest

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ logs
.env
.env.*
!.env.example

.wrangler
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,65 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## v2.1.0

[compare changes](https://github.com/ikxin/kms-tools/compare/v2.0.0...v2.1.0)

### 🚀 Enhancements

- 支持通过环境变量自定义监控频率 ([#38](https://github.com/ikxin/kms-tools/pull/38))
- 使用 node.js 实现 vlmcs 客户端 ([106bc6d](https://github.com/ikxin/kms-tools/commit/106bc6d))
- 移除本地 vlmcsd 相关配置 ([db3c576](https://github.com/ikxin/kms-tools/commit/db3c576))
- 集成 motion-v 增强组件间的动画效果 ([bd97f54](https://github.com/ikxin/kms-tools/commit/bd97f54))
- 新增监控页面平均延迟和成功率 ([1b7dd27](https://github.com/ikxin/kms-tools/commit/1b7dd27))
- 添加 KMS 检测结果详情页面 ([8e8bbbf](https://github.com/ikxin/kms-tools/commit/8e8bbbf))
- 新增赞助商模块 ([4eeaec9](https://github.com/ikxin/kms-tools/commit/4eeaec9))
- 新增繁体中文、俄语、法语、韩语等多种语言 ([61d247a](https://github.com/ikxin/kms-tools/commit/61d247a))
- 监控任务调度并添加 Cloudflare 部署设置 ([38857aa](https://github.com/ikxin/kms-tools/commit/38857aa))
- 集成 Arco Design 组件库 ([79a75e4](https://github.com/ikxin/kms-tools/commit/79a75e4))
- 兼容多平台 Storage 数据 ([b0ce704](https://github.com/ikxin/kms-tools/commit/b0ce704))
- 将主机指标合并为单次存储写入 ([be27c90](https://github.com/ikxin/kms-tools/commit/be27c90))
- 为连接和接收数据的 socket 添加超时处理 ([c767490](https://github.com/ikxin/kms-tools/commit/c767490))
- 接入 Nuxt SEO 模块实现站点地图 ([7d6331b](https://github.com/ikxin/kms-tools/commit/7d6331b))
- 引入 unplugin 组件插件并注册 Arco 设计图标 ([a9ef9bc](https://github.com/ikxin/kms-tools/commit/a9ef9bc))

### 🩹 Fixes

- 生产环境环境变量不生效问题 ([#37](https://github.com/ikxin/kms-tools/pull/37))
- 移除构建和启动命令 ([0b85098](https://github.com/ikxin/kms-tools/commit/0b85098))
- 修复激活页面 URL.createObjectURL() 未实现 ([09b0593](https://github.com/ikxin/kms-tools/commit/09b0593))
- 替换 BigInt 字面量以兼容 ES2019 打包目标 ([0f8f9d2](https://github.com/ikxin/kms-tools/commit/0f8f9d2))
- 修复监控数据排序逻辑以按成功率和延迟排序 ([0f83ad7](https://github.com/ikxin/kms-tools/commit/0f83ad7))
- 修复 Arco 深色模式刷新闪烁 ([1e84130](https://github.com/ikxin/kms-tools/commit/1e84130))

### 💅 Refactors

- 重构 RPC 处理并集成 node-vlmcs ([b3539e7](https://github.com/ikxin/kms-tools/commit/b3539e7))

### 🏡 Chore

- 删除历史遗留的代码 ([4b51728](https://github.com/ikxin/kms-tools/commit/4b51728))
- 更新监控间隔和默认监控列表 ([881f8df](https://github.com/ikxin/kms-tools/commit/881f8df))
- Prettier 迁移到 Oxfmt ([6911256](https://github.com/ikxin/kms-tools/commit/6911256))
- 发布 node-vlmcs 到 npmjs ([77d8a1d](https://github.com/ikxin/kms-tools/commit/77d8a1d))
- 修改 Cloudflare KV 绑定名称 ([77f3b54](https://github.com/ikxin/kms-tools/commit/77f3b54))
- 多平台同步使用 Cloudflare KV 存储监控数据 ([c7b8e36](https://github.com/ikxin/kms-tools/commit/c7b8e36))
- 移除 @vueuse/nuxt 模块 ([b3989b0](https://github.com/ikxin/kms-tools/commit/b3989b0))
- 将 Tailwind CSS 从 Nuxt 模块改成 Vite 插件接入 ([4195b01](https://github.com/ikxin/kms-tools/commit/4195b01))
- 更新 CI 和 Docker 工作流中的依赖版本 ([412e926](https://github.com/ikxin/kms-tools/commit/412e926))
- 集成 changelogen 版本管理工具 ([bbeea2c](https://github.com/ikxin/kms-tools/commit/bbeea2c))

### 🎨 Styles

- 调整 Arco Design 边框和内边距默认样式 ([51b3fae](https://github.com/ikxin/kms-tools/commit/51b3fae))

### ❤️ Contributors

- Ikxin <i@ikxin.com>
- 一纸忘忧 ([@ikxin](https://github.com/ikxin))
- Notte ([@ikxin](https://github.com/ikxin))
- Copilot ([@MicrosoftCopilot](https://github.com/MicrosoftCopilot))

## [2.0.0] - 2026-03-17

### 🚀 Major Changes
Expand Down
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,46 @@ Please take a moment to review our [code of conduct](./CODE_OF_CONDUCT.md) to en
In this guide, you will receive an overview of the contribution workflow, including opening an issue, creating a PR, and reviewing and merging PRs.

You can quickly navigate to specific sections of this guide using the directory icon in the top left corner of this document.

## Commit messages

This project uses [Conventional Commits](https://www.conventionalcommits.org/) so that changelogen can generate release notes and determine the next version automatically. Use one of the following prefixes for commits that should appear in the changelog:

- `feat:` for new features (minor release)
- `fix:` or `perf:` for fixes and performance improvements (patch release)
- `feat!:` or a `BREAKING CHANGE:` footer for breaking changes (major release)
- `refactor:`, `docs:`, `style:`, `test:`, `build:`, `ci:`, or `chore:` for other changes

For example:

```text
feat: add KMS server health checks
```

## Release process

Releases are managed with [changelogen](https://github.com/unjs/changelogen). This process updates the root project version; the `node-vlmcs` package is versioned separately.

1. Check out `main`, pull the latest changes, and make sure the working tree is clean.
2. Preview the unreleased changelog:

```bash
pnpm release:preview
```

3. Create and push the release:

```bash
pnpm release
```

The release command updates `package.json` and `CHANGELOG.md`, creates a `chore(release): vX.Y.Z` commit and matching Git tag, pushes both, and creates or updates the GitHub Release. Authenticate the GitHub CLI with `gh auth login`, or provide `GITHUB_TOKEN`, `GH_TOKEN`, or `CHANGELOGEN_TOKENS_GITHUB`; without a token, changelogen opens the manual GitHub Release page.

To override the inferred SemVer change, pass `--major`, `--minor`, `--patch`, or an exact version with `-r`:

```bash
pnpm run release --patch
pnpm run release -r 2.1.0
```

Pushing the `vX.Y.Z` tag also starts the Docker image release workflow.
33 changes: 10 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,25 @@
FROM alpine:latest AS vlmcsd-builder

WORKDIR /root

RUN apk add --no-cache git make build-base && \
git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git && \
cd vlmcsd/ && \
make

FROM node:20-slim AS app-builder
FROM node:lts-slim AS app-builder

WORKDIR /app

COPY package.json pnpm-lock.yaml ./

RUN corepack enable && pnpm install --frozen-lockfile

COPY . .

RUN NITRO_PRESET=node-server pnpm run build
RUN npm install --global corepack@latest && \
corepack enable && \
pnpm install --frozen-lockfile && \
NITRO_PRESET=node-server pnpm build

FROM node:20-slim

COPY --from=vlmcsd-builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd
COPY --from=app-builder /app/.output /app/.output

RUN chmod +x /usr/bin/vlmcsd
FROM node:lts-slim

WORKDIR /app

COPY --from=app-builder /app/.output /app/.output

VOLUME ["/app/.data"]

EXPOSE 3000 1688
EXPOSE 3000

ENV HOST=0.0.0.0
ENV PORT=3000

CMD ["sh", "-c", "/usr/bin/vlmcsd -D -e & node .output/server/index.mjs"]
CMD ["node", ".output/server/index.mjs"]
3 changes: 0 additions & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ The static version uses https://kms.ikxin.com API by default. You can deploy you
| [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss) | Utility-first CSS framework |
| [Arco Design Vue](https://github.com/arco-design/arco-design-vue) | Enterprise-level design system by ByteDance |
| [ECharts](https://github.com/apache/echarts) | Feature-rich interactive charting library |
| [VueUse](https://github.com/vueuse/vueuse) | Collection of essential Composition API utilities |
| [Nuxt I18n](https://github.com/nuxt-modules/i18n) | Internationalization plugin for Nuxt |

## 📦 Deployment
Expand Down Expand Up @@ -95,7 +94,6 @@ services:
container_name: kms-tools
ports:
- 3000:3000
- 1688:1688
volumes:
- kms-data:/app/.data
environment:
Expand All @@ -112,7 +110,6 @@ Or using Docker CLI:
docker run -d \
--name kms-tools \
-p 3000:3000 \
-p 1688:1688 \
-v kms-data:/app/.data \
ikxin/kms-tools:latest
```
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ https://kms.ikxin.com
| [Tailwind CSS](https://github.com/tailwindlabs/tailwindcss) | 实用性优先的 CSS 框架 |
| [Arco Design Vue](https://github.com/arco-design/arco-design-vue) | 字节跳动开发的企业级产品设计系统 |
| [ECharts](https://github.com/apache/echarts) | 功能丰富的交互式图表库 |
| [VueUse](https://github.com/vueuse/vueuse) | 基于 Composition API 的实用函数集合 |
| [Nuxt I18n](https://github.com/nuxt-modules/i18n) | 适用于 Nuxt 的国际化支持插件 |

## 📦 部署
Expand Down Expand Up @@ -95,7 +94,6 @@ services:
container_name: kms-tools
ports:
- 3000:3000
- 1688:1688
volumes:
- kms-data:/app/.data
environment:
Expand All @@ -112,7 +110,6 @@ volumes:
docker run -d \
--name kms-tools \
-p 3000:3000 \
-p 1688:1688 \
-v kms-data:/app/.data \
ikxin/kms-tools:latest
```
Expand Down
Loading