diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c46b881 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: shell +os: linux +arch: amd64 +dist: bionic + +services: docker + +branches: + only: + - master + +script: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker build --pull -t alvisisme/vlmcsd . + - docker push alvisisme/vlmcsd + +notifications: + email: + recipients: + - alvisisme@163.com + on_success: never + on_failure: always \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d844367..092dd9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,12 @@ -FROM alvisisme/ubuntu:16.04 -LABEL maintainer="Alvis Zhao" +FROM alpine:3.11.3 as 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 -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y gcc make wget && \ - wget https://codeload.github.com/alvisisme/vlmcsd/tar.gz/svn1112 -O svn1112.tar.gz && \ - tar xzf svn1112.tar.gz && \ - cd vlmcsd-svn1112 && \ - make && \ - cp bin/vlmcsd /usr/local/bin/ && \ - cp bin/vlmcs /usr/local/bin/ && \ - chmod +x /usr/local/bin/vlmcsd && \ - chmod +x /usr/local/bin/vlmcs && \ - cd .. && \ - rm -rf vlmcsd-svn1112 && \ - rm svn1112.tar.gz && \ - rm -rf /var/lib/apt/lists/* - -EXPOSE 1688 - -CMD ["/usr/local/bin/vlmcsd", "-D", "-d", "-t", "3", "-e", "-v"] +FROM alpine:3.11.3 +WORKDIR /root/ +COPY --from=builder /root/vlmcsd/bin/vlmcsd /usr/bin/vlmcsd +EXPOSE 1688/tcp +CMD [ "/usr/bin/vlmcsd", "-D", "-d", "-t", "3", "-e", "-v" ] diff --git a/README.md b/README.md index a791f83..b5648e9 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,52 @@ -# vlmcsd is a replacement for Microsoft's KMS server. +# Microsoft's KMS server +[![Build Status](https://img.shields.io/travis/com/alvisisme/docker-vlmcsd?style=flat-square)](https://travis-ci.com/alvisisme/docker-vlmcsd) +![Docker Pulls](https://img.shields.io/docker/pulls/alvisisme/vlmcsd?style=flat-square) +Windows KMS 激活服务器,用于激活windows和office套件等。 -> It contains vlmcs, a KMS test client, mainly for debugging purposes, that also can "charge" a genuine KMS server designed to run on an always-on or often-on device, e.g. router, NAS Box, ...intended to help people who lost activation of their legally-owned licenses, e.g. due to a change of hardware (motherboard, CPU, ...) - -> vlmcsd is not a one-click activation or crack tool intended to activate illegal copies of software (Windows, Office, Project, Visio) +## 目录 -## Info / About this docker -Docker based in Alpine OS with vlmcsd compiled from "source" (Wind4 GitHub) +- [背景](#背景) +- [安装](#安装) +- [用法](#用法) +- [维护人员](#维护人员) +- [贡献参与](#贡献参与) +- [许可](#许可) +- [参考引用](#参考引用) -## Server Usage: -> $ docker run -d -p 1688:1688 --restart=always --name vlmcsd mikolatero/vlmcsd +## 背景 -## To view docker log: -Now (thanks to embii74) vlmcsd process send logs to docker. -> $ docker logs vlmcsd (change 'vlmcsd' with the docker's name) +KMS(Key Management Service) 是微软为了方便在企业内部批量激活windows系统等推出的服务,通过设定指定的激活服务器并执行特定脚本来进行批量激活和管理。 + +vlmcsd 是一个KMS服务端模拟程序,能够利用KMS激活原理实现 Windows, Office, Visio等激活,源码公开并能在PC机,路由器,树莓派等各种设备上运行,非常方便。 + +本工程仅说明如何在通用linux服务器上配置该服务,如需要运行在其它设备上(Android手机等)请自行参考相关资料。需要注意的是,从 windwos 8/8.1 之后,无法使用localhost本地服务地址进行KMS激活(见[vlmcsd issues 6](https://github.com/Wind4/vlmcsd/issues/6#issuecomment-302896783))。 + +如果需要通过KMS服务激活,需要下载windows/office的大客户(VOL)版本,家庭版是无法通过这种方式激活的,请确保版本对应,windows系统和office软件推荐从 [MSDN I Tell You](https://msdn.itellyou.cn/) 网站上下载。 + +## 安装 + +找一个linux服务器执行如下语句启动服务端程序,请自行安装docker + +```bash +docker run -d -p 1688:1688 --restart=always --name kms-server alvisisme/vlmcsd +``` + +或者利用 docker-compose 自行编译并运行 + +```bash +git clone https://github.com/alvisisme/docker-vlmcsd.git +cd docker-vlmcsd +docker-compose up --build -d +``` + +记下服务器对外可访问的IP地址 **DOCKER_IP**,客户端配置需要该地址,见 [用法](#用法) 一节 + +## 用法 + +客户端安装好windows系统和Office软件后,以**管理员权限**打开终端下执行如下语句,根据需要激活的系统/软件选择对应命令 -## Client ### Windows ``` slmgr.vbs -upk @@ -44,14 +74,33 @@ cscript ospp.vbs /act cscript ospp.vbs /dstatusall ``` -## Sources -> https://forums.mydigitallife.info/threads/50234-Emulated-KMS-Servers-on-non-Windows-platforms -https://github.com/Wind4/vlmcsd +其中, + +**DOCKER_IP** 是部署服务端程序的服务器地址 + +**xxxxx-xxxxx-xxxxx-xxxxx-xxxxx** 表示需要激活的系统/软件的 GVLK keys,可以从微软的官方文档上找到。 + +Office不同版本路径不同,根据自身情况修改目录地址。 + +## 维护人员 + +[@Alvis Zhao](https://github.com/alvisisme) + +## 贡献参与 + +欢迎提交PR。 + +## 许可 + +本工程仅供本人学习测试使用,请支持正版。 + +© 2019-2020 Alvis Zhao -## GVLK keys -* Windows: https://technet.microsoft.com/en-us/library/jj612867(v=ws.11).aspx -* Office 2013: https://technet.microsoft.com/en-us/library/dn385360.aspx -* Office 2016: https://technet.microsoft.com/en-us/library/dn385360(v=office.16).aspx +## 参考引用 -## Docker Link -> https://hub.docker.com/r/alvisisme/vlmcsd +* [Wind4/vlmcsd](https://github.com/Wind4/vlmcsd) +* [mikolatero/docker-vlmcsd](https://github.com/mikolatero/docker-vlmcsd) +* [Emulated KMS Servers on non-Windows platforms](https://forums.mydigitallife.info/threads/50234-Emulated-KMS-Servers-on-non-Windows-platforms) +* [Windows GVLK keys](https://technet.microsoft.com/en-us/library/jj612867(v=ws.11).aspx) +* [Office 2013 GVLK keys](https://technet.microsoft.com/en-us/library/dn385360.aspx) +* [Office 2016 GVLK keys](https://technet.microsoft.com/en-us/library/dn385360(v=office.16).aspx) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..55f8921 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3" +services: + kms: + build: . + ports: + - "1688:1688" + restart: always \ No newline at end of file