Skip to content

About

微软积分自动化 · v5.0.0 · 中文面板 · CN 补丁镜像 · 单文件包 | Microsoft Rewards automation with a Chinese panel, CN-patched image and self-hosted release pipeline

Topics

Resources

Stars

26 stars

Watchers

0 watching

Forks

Latest commit

 

History

373 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Rewards Script v5

Validate Version GHCR Node Docker Pulls Panel All-in-one License

简体中文 · English · 完整中文说明 · 文档 · 控制接口

一条命令装好 —— 脚本 + 中文面板,同一个容器

curl -fsSL https://raw.githubusercontent.com/wangixangya/Microsoft-Rewards-Script/v5/deploy/install.sh | bash -s -- 你的邮箱 你的密码

装完打开 http://<本机IP>:5310(默认密码 admin)· 需要 2 分钟 · 只要装了 Docker
国内拉不到脚本时:把 https://raw.githubusercontent.com/ 换成 https://ghfast.top/https://raw.githubusercontent.com/
English: run the same command with bash -s -- your@email.com yourpassword


概览

微软积分自动化脚本 —— 支持 API 与浏览器两种模式、会话复用、多账号、本地化搜索与控制接口。 本仓库是 TheNetsky/Microsoft-Rewards-Script 上游 v5 的持续跟进分支:与上游保持每日同步,并额外提供中文控制台、国内网络补丁镜像与自动化发布流水线。

来源与致谢(二改声明)

本仓库是二改版本,代码来源链条如下:

  1. 原作者:TheNetsky/Microsoft-Rewards-Script —— 原始项目,v5 全部核心逻辑与架构归原作者;
  2. 中文/国内适配:hex-ci/Microsoft-Rewards-Script —— 本仓库在此基础上做的中文适配与国内网络处理;
  3. 本仓库(二次改动):在 hex-ci 的基础上继续二改,新增中文 Web 控制台、:5-cn 国内补丁镜像、单文件 JS 打包与自动化发布流水线。

原项目版权归原作者所有,遵循 GPL-3.0;本二改部分同样以 GPL-3.0 发布,保留原作者与 hex-ci 的署名。请优先支持原作者与 hex-ci 的上游项目。

运行环境 Node.js ≥ 24 · patchright · Docker(amd64 / arm64)
运行模式 api(HTTP,快)· browser(渲染卡片,GhostCursor)· maximize(尽量多刷)
并发 clusters 1–4 分片并行 · accountDelay 随机 1–3 分钟
入口 命令行 · Docker · 控制接口 · 中文 Web 面板
上游 每日 05:00 自动合并 TheNetsky v5(经 hex-ci 中文适配)

特性

自动化

  • 每日任务、促销活动、打卡卡片、奖励领取
  • 桌面 / 移动搜索、Bing Explore
  • 每日签到、阅读赚分、连续天数保护
  • 可选视觉搜索与后台 Edge 浏览

运维

  • 会话复用、多账号、按账号独立定时
  • 控制接口:实时事件、历史记录、卡片进度
  • Discord / Telegram / ntfy 推送

本分支增强

  • 中文 Web 面板(总览 / 日志 / 配置 / 奖励 / 发布)
  • :5-cn 镜像:放宽 Bing 域名判定,支持 cn.bing.com
  • 单文件 JS 包,青龙 / 纯 Node 环境可直接跑

工程化

  • Validate(tsc + eslint + prettier)每次推送必跑
  • patch-bing-origin.js 源码级打补丁,少于 5 处替换直接失败
  • 面板 / 单文件包按哈希判断变更,避免无意义重复发布

快速开始

一条命令装好(内含中文面板)

curl -fsSL https://raw.githubusercontent.com/wangixangya/Microsoft-Rewards-Script/v5/deploy/install.sh | bash -s -- 你的微软邮箱 你的密码

跑完打开 http://<本机IP>:5310,面板密码 admin。脚本会自动生成 API token、建好 config/ 与 sessions/、拉镜像并启动容器。 可选:PORT=5310、DIR=$PWD/ms-rewards、PANEL_PASSWORD=admin、FORCE=1(重建已存在的容器)。 国内拉不到时换成镜像加速地址:curl -fsSL https://ghfast.top/https://raw.githubusercontent.com/wangixangya/Microsoft-Rewards-Script/v5/deploy/install.sh | bash -s -- 邮箱 密码

不想用一键脚本?手动 docker run
docker run -d --name ms-rewards --restart unless-stopped \
  -p 5310:5310 -e TZ=Asia/Shanghai \
  -e API_TOKEN=<自己生成一串> -e PANEL_PASSWORD=admin \
  -e ACCOUNT_1_EMAIL=你的邮箱 -e ACCOUNT_1_PASSWORD=你的密码 \
  -v "$PWD/config:/usr/src/microsoft-rewards-script/config" \
  -v "$PWD/sessions:/usr/src/microsoft-rewards-script/sessions" \
  -v ms-panel-data:/opt/data \
  docker.io/wangxiangya/ms-rewards-v5:5-cn-allinone
镜像 用途
ghcr.io/thenetsky/microsoft-rewards-script:5 上游官方镜像
ghcr.io/wangixangya/microsoft-rewards-script:5 本仓库镜像(与上游一致)
ghcr.io/wangixangya/microsoft-rewards-script:5-cn 国内补丁版 + 瘦身(推荐)

拉不下来? ghcr 包若提示 denied / 403,有两种解法:

  • 带凭证拉:echo <有 read:packages 权限的 PAT> | docker login ghcr.io -u wangixangya --password-stdin
  • 免登录离线包:从 Release v5-cn-image 下载 ms-rewards-v5-cn.tar.zst,然后 zstd -d ms-rewards-v5-cn.tar.zst -c | docker load(导入后标签与学生镜像一致)
  • 免登录直接 pull(Docker Hub 备份):docker pull docker.io/wangxiangya/ms-rewards-v5:5-cn
本地构建
npm ci
npm run install:browser   # Linux: npx patchright install --with-deps chromium
npm run build
cp env.example .env && cp config.example.json config.json
npm start

在 .env 里设置 ACCOUNT_1_EMAIL 与登录信息,每个账号加一组编号变量。 详见 env.example 与 使用文档。


中文面板

Panel

单文件、零依赖的控制台,手机端与桌面端同样好用。

页面 能做什么
总览 今日 / 近 7 日 / 余额、系统状态(CPU、内存、磁盘、温度、容器)
账号与会话 增删账号、绑定代理、密码 / 2FA、单账号立即运行、独立定时
运行日志 最近 3 天运行记录、按账号筛选、实时日志、自动刷新
任务配置 config.json 可视化编辑、workers 开关、并发 clusters
奖励中心 余额、可领取、每日领取、自动领取(默认 09:10)
设置 运行计划、推送渠道、代理、镜像与版本、发布中心、备份与恢复
cd panel && python3 server.py     # 0.0.0.0:5310,密码见 panel.conf

三种跑法,任选一种

方式 镜像 需要暴露 适合
一体化(最省事) docker.io/wangxiangya/ms-rewards-v5:5-cn-allinone 5310(面板)+ 3010(可选) 一台机器、一个容器,不用装 Python
一体化 + docker CLI ...:5-cn-allinone-docker 同上 + 挂 docker.sock 想在面板里直接管容器 / 镜像(+30 MB)
分体(本机在用) ms-rewards-v5:5-cn + ms-rewards-v5-panel:latest 3010(只给本机)+ 5310 想单独升级 / 重启其中一半
纯宿主 ms-rewards-v5:5-cn 3010 面板用 python3 panel/server.py 跑在宿主机

一体化(面板已内置)

docker run -d --name ms-rewards --restart unless-stopped \
  -p 5310:5310 -e TZ=Asia/Shanghai \
  -e API_TOKEN=<你的 API_TOKEN> -e PANEL_PASSWORD=admin \
  -v "$PWD/config:/usr/src/microsoft-rewards-script/config" \
  -v "$PWD/sessions:/usr/src/microsoft-rewards-script/sessions" \
  -v ms-panel-data:/opt/data \
  --env-file .env docker.io/wangxiangya/ms-rewards-v5:5-cn-allinone
# 打开 http://<IP>:5310 就是面板,容器内 API 自己监听 3010

分体(面板独立镜像,约 88 MB)

docker run -d --name ms-rewards-panel --restart unless-stopped \
  -p 5310:5310 --network host \
  -e API_BASE=http://127.0.0.1:3010 -e API_TOKEN=<同上> -e PANEL_PASSWORD=admin \
  -v panel-data:/opt/data \
  -v "$PWD/config:/root/microsoft-rewards-script/config:ro" \
  docker.io/wangxiangya/ms-rewards-v5-panel:latest

或者一条 docker compose 起两个容器:deploy/docker-compose.yml

  • 面板状态都在卷里(panel.conf、state.json、历史统计),换镜像不丢

自己构建(本机已有运行镜像时不用拉 763 MB)

# 面板独立镜像
docker build -f panel-image/Dockerfile -t ms-rewards-panel:local .
# 一体化镜像(BASE 指向本地已有运行时镜像)
docker build -f deploy/Dockerfile.all-in-one --build-arg BASE=ms-rewards:v5-cn -t ms-rewards:allinone .
  • 一体化镜像里的面板默认不自带定时(DISABLE_SCHEDULE=1),避免和运行时 cron 打架

想恢复面板里的「重建容器 / 镜像管理」? 用带 docker CLI 的变体,并挂 socket:

docker run -d --name ms-rewards --restart unless-stopped \
  -p 5310:5310 -v /var/run/docker.sock:/var/run/docker.sock \
  -e TZ=Asia/Shanghai -e API_TOKEN=<token> -e PANEL_PASSWORD=admin \
  -v "$PWD/config:/usr/src/microsoft-rewards-script/config" \
  -v "$PWD/sessions:/usr/src/microsoft-rewards-script/sessions" \
  -v ms-panel-data:/opt/data --env-file .env \
  docker.io/wangxiangya/ms-rewards-v5:5-cn-allinone-docker

这个变体可以用面板里的:

  • 重建容器 —— 改账号 / 并发 / 代理后自动按新配置重建自己
  • 镜像更新 —— 一键拉 Docker Hub 最新镜像并自助重建(日志在面板里可查)

⚠️ 挂 docker.sock 等于把宿主 docker 权限交给容器,只在你信任这个镜像时用。


架构

Pipeline

  • 同步:上游合并 → 冲突规则(面板/文档保留本地、源码取上游)→ 推送 → CI
  • 补丁:origin === URLs.bing.origin 改写为 isBingHost(...),让 cn.bing.com 通过校验
  • 发布:面板文件与单文件包按哈希比对,只有真正变化才重新部署

配置

{
    "clusters": 2, // 并发分片数
    "headless": true,
    "accountDelay": { "min": 1, "max": 3 }, // 分片之间的随机间隔(分钟)
    "taskDelay": { "min": 3, "max": 8 }, // 任务之间的随机间隔(秒)
    "rewardsMode": "maximize", // maximize | points | api | browser
    "workers": { "doDailySet": true, "doMorePromotions": true, "doPunchCard": true },
    "searchSettings": { "useGeoLocale": false, "scrollRandomResults": true },
    "globalTimeout": "30m",
    "debugLogs": false
}

内存占用:空闲约 34 MiB,单账号峰值约 1.19 GiB;2 并发建议预留 ≥ 2 GB。


文档

文档 内容
README.zh-CN.md 完整中文说明:v5 差异、配置项、面板、单文件、同步流程、FAQ
docs/usage.md 安装、账号、设置、命令、排错
docs/control-api.md 鉴权、接口、运行控制、调度、面板数据
docs/ms-domains-direct.zh-CN.md 微软/Bing 域名强制直连:原因、域名清单、配置与验证
panel/README.md 面板部署与版本变更

安全与声明

.env、config/、sessions/、diagnostics/ 含账号凭据与会话 Cookie,不要提交、不要外传。 自动化操作可能违反服务条款,请自行评估风险;建议一个账号对应一个出口 IP。


English

Microsoft Rewards Script — automation for Microsoft Rewards with API and browser modes, saved sessions, multi-account support, localised searches and a Control API. This branch (v5) is a maintained fork of TheNetsky/Microsoft-Rewards-Script, synced with upstream daily and extended with a Chinese control panel, a CN-patched image and a self-hosted release pipeline.

Credits / what this fork is. This is a second-order fork:

  1. Original author — TheNetsky/Microsoft-Rewards-Script: all core v5 logic and architecture.
  2. Chinese / CN-network adaptation — hex-ci/Microsoft-Rewards-Script: the base this repo is modified from.
  3. This repo (second modification) — Chinese web panel, :5-cn CN-patched image, single-file JS bundle and an automated release pipeline on top of the two above.

All original copyright stays with the original authors. Released under GPL-3.0, with attribution to TheNetsky and hex-ci preserved. Please star and support the upstream projects first.

Runtime Node.js ≥ 24 · patchright · Docker (amd64 / arm64)
Modes api (HTTP, fast) · browser (rendered cards, GhostCursor) · maximize
Scale clusters 1-4 parallel shards · randomised accountDelay 1-3 min
Surface CLI · Docker · Control API · Chinese web panel
Upstream TheNetsky v5 (via hex-ci CN adaptation), merged daily at 05:00

Features

  • Daily Set, promotions, punchcards and bonus-point claims
  • Desktop / mobile searches, Explore on Bing, Check-In, Read to Earn
  • Streak progress, API-based streak protection, verified point reporting
  • Per-account scheduling, saved sessions, Discord / Telegram / ntfy notifications
  • Control API with live events, persistent history and punchcard progress

Fork additions — Chinese panel (overview, logs, config, rewards, release), :5-cn image with the Bing origin check widened for cn.bing.com, and a single-file JS bundle for QingLong or Node-only hosts.

Quick start

One command (panel included)

curl -fsSL https://raw.githubusercontent.com/wangixangya/Microsoft-Rewards-Script/v5/deploy/install.sh | bash -s -- your@email.com yourpassword

Then open http://<host-ip>:5310 (panel password admin). The script generates the API token, creates config/ and sessions/, pulls the all-in-one image and starts the container. Overrides: PORT, DIR, PANEL_PASSWORD, FORCE=1.

docker run -d --name ms-rewards \
  -e TZ=Asia/Shanghai \
  -e CONFIG_CLUSTERS=2 \
  -v "$PWD/config:/usr/src/microsoft-rewards-script/config" \
  -v "$PWD/sessions:/usr/src/microsoft-rewards-script/sessions" \
  ghcr.io/wangixangya/microsoft-rewards-script:5-cn
Image Purpose
ghcr.io/thenetsky/microsoft-rewards-script:5 Upstream build
ghcr.io/wangixangya/microsoft-rewards-script:5 This fork, mirrored
ghcr.io/wangixangya/microsoft-rewards-script:5-cn CN patch + slim (recommended)

Cannot pull? If ghcr returns denied / 403: either log in with a PAT that has read:packages (echo <PAT> | docker login ghcr.io -u wangixangya --password-stdin), or use the no-login offline archive from Release v5-cn-image: zstd -d ms-rewards-v5-cn.tar.zst -c | docker load. Or pull the mirrored copy from Docker Hub, no login required: docker pull docker.io/wangxiangya/ms-rewards-v5:5-cn

Multi-arch (amd64 + arm64). :5-cn, :<version>-cn, :5-cn-allinone, :5-cn-allinone-docker and the panel image are multi-arch manifests, so a plain docker pull picks the right architecture on ARM boxes (Raspberry Pi 4/5, RK3588, Docker Desktop on Apple silicon). Per-arch tags exist too: :5-cn-amd64 / :5-cn-arm64. docker buildx imagetools inspect <image> shows the manifest.

No manual browser install on arm64: patchright resolves chrome-headless-shell-linux-arm64 for debian12-arm64, and the slim layer matches chrome-headless-shell-linux* so one Dockerfile serves both arches. To build both locally: ./deploy/build-multiarch.sh (--push to publish, --only arm64 for one arch).

Panel

A single-file, dependency-free control panel for the running container, built for phones as much as desktops: overview with system metrics, accounts and sessions, last-3-days run history with per-account filtering, live logs, visual config editing, rewards centre, scheduling, proxies, image/release management and config backup.

cd panel && python3 server.py     # 0.0.0.0:5310, password in panel.conf

Three ways to run it — pick one:

Setup Images Ports Notes
All-in-one ms-rewards-v5:5-cn-allinone 5310 (+3010 optional) One container, panel built in, no Python needed
Split ms-rewards-v5:5-cn + ms-rewards-v5-panel:latest 3010 (local only) + 5310 Upgrade/restart each half independently
Host panel ms-rewards-v5:5-cn 3010 Run python3 panel/server.py on the host
# all-in-one
docker run -d --name ms-rewards --restart unless-stopped -p 5310:5310 \
  -e TZ=Asia/Shanghai -e API_TOKEN=<token> -e PANEL_PASSWORD=admin \
  -v "$PWD/config:/usr/src/microsoft-rewards-script/config" \
  -v "$PWD/sessions:/usr/src/microsoft-rewards-script/sessions" \
  -v ms-panel-data:/opt/data --env-file .env \
  docker.io/wangxiangya/ms-rewards-v5:5-cn-allinone

A ready-to-use two-service stack lives in deploy/docker-compose.yml. Panel state persists in the panel-data volume; the all-in-one image disables the panel's own scheduler (DISABLE_SCHEDULE=1) so it never competes with the runtime cron.

Documentation

Security & disclaimer

Keep .env, config/, sessions/ and diagnostics/ private — they contain credentials and session cookies. Automation of reward programs may violate the provider's terms of service; use at your own risk, one account per egress IP is strongly advised.


Fork of TheNetsky/Microsoft-Rewards-Script · GPL-3.0-or-later
中文面板 · CN 镜像 · 发布流水线 —— maintained by wangixangya

About

微软积分自动化 · v5.0.0 · 中文面板 · CN 补丁镜像 · 单文件包 | Microsoft Rewards automation with a Chinese panel, CN-patched image and self-hosted release pipeline

Topics

Resources

Stars

26 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages