From d1b0182a6cad9d635a95508ef16405c7282121bb Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sun, 8 Aug 2021 02:34:37 +0800 Subject: [PATCH] docs: about kms check --- README.md | 31 ++++++++++++++++++++++++++++++- backend/kms-check.php | 6 ++---- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 704026a..5da7726 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ shell> curl kms.343.re/win-server # 输出Office激活说明 shell> curl kms.343.re/office +# 测试其他KMS服务器是否正常 +shell> curl "kms.343.re/check?host=kms.dnomd343.top&port=1688" + ``` 部署完成后,需要KMS服务的地方填入 `kms.343.re` 即可激活。 @@ -323,14 +326,22 @@ shell> tar xf binaries.tar.gz # 不同架构主机选择不同文件,以下为常见示例 # x86-64架构 shell> cp binaries/Linux/intel/static/vlmcsd-x64-musl-static /usr/bin/vlmcsd +shell> cp binaries/Linux/intel/static/vlmcs-x64-musl-static /usr/bin/vlmcs # x86架构 shell> cp binaries/Linux/intel/static/vlmcsd-x86-musl-static /usr/bin/vlmcsd +shell> cp binaries/Linux/intel/static/vlmcs-x86-musl-static /usr/bin/vlmcs # arm架构 shell> cp binaries/Linux/arm/little-endian/static/vlmcsd-armv7el-uclibc-static /usr/bin/vlmcsd +shell> cp binaries/Linux/arm/little-endian/static/vlmcs-armv7el-uclibc-static /usr/bin/vlmcs +``` -# 确认vlmcsd是否正常 +确认是否正确安装 + +``` shell> vlmcsd -V ···vlmcsd版本信息··· +shell> vlmcs -V +···vlmcs版本信息··· ``` 将vlmcsd配置为系统服务 @@ -381,6 +392,24 @@ Active: active (running) ··· + `/json`:输出各版本Windows和Windows Server的KMS密钥; +### KMS测试 + +`kms-server` 内置了检测其他KMS服务器是否可用的功能,接口位于 `/check` 下,使用时指定目标服务器以下参数 + ++ `host`:服务器IPv4、IPv6地址或域名 + ++ `port`:KMS服务端口,默认1688 + ++ `site`:KMS请求中的 `workstation` 参数,可选 + +``` +shell> curl "kms.343.re/check?host=47.242.30.65" +{"status":"ok","message":"success"} + +shell> curl "kms.343.re/check?host=kms.dnomd343.top&port=8861" +{"status":"error","message":"connect fail"} +``` + ### 容器构建 **本地构建** diff --git a/backend/kms-check.php b/backend/kms-check.php index 718cbb1..819d6a1 100644 --- a/backend/kms-check.php +++ b/backend/kms-check.php @@ -1,7 +1,6 @@ 'illegal port' ); } else { - $cmd .= ':' . $port; + $cmd .= ':' . $port; // 命令中加入端口信息 } if ($site !== null) { $cmd .= ' -w ' . $site; // 加入site参数