From af87e416ce47c1d48c37910ed51ec9f98da42633 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Mon, 27 Jul 2026 21:53:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B8=82=E5=9C=BA=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=84=9A=E6=9C=AC=E7=94=9F=E6=88=90,?= =?UTF-8?q?=E9=A2=84=E7=BD=AE=2024=20=E4=B8=AA=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 scripts/gen-market.py 生成市场 JSON,替代手写。模板数可传参调整。 端口排布与容量上限: 四组端口各自从常规基址每实例 +10。最先相撞的是 RCON(21114 起)追上 查询端口基址(27165),故实例数硬上限为 606,超出会让不同实例的不同 服务抢同一端口。脚本对超限直接报错并说明原因。 已校验:24 个模板占用 144 个端口(24×6)零冲突;RCON 端口与 rconPort 字段一致;pingConfig 指向查询端口而非模板默认的 Minecraft 25565; networkMode 均为 host;memory 均非 0;镜像均非 Docker Hub;编码均 utf8。 边界用例 607 被拒、606 可生成且末个 RCON 恰好不越界。 模板按每 8 个分组,避免市场列表过长难找。 Co-Authored-By: Claude Opus 5 (1M context) --- mcsm-market.json | 1488 ++++++++++++++++++++++++++++++++++++++++- scripts/gen-market.py | 155 +++++ 2 files changed, 1622 insertions(+), 21 deletions(-) create mode 100755 scripts/gen-market.py diff --git a/mcsm-market.json b/mcsm-market.json index 69d96e7..8350c6b 100644 --- a/mcsm-market.json +++ b/mcsm-market.json @@ -8,23 +8,22 @@ ], "packages": [ { - "title": "Squad 专用服务器 — 实例 1", + "title": "Squad 实例 01", "language": "zh_cn", "platform": "Linux", - "description": "端口已预排,可与其他实例并存。游戏 7787/7788 · 查询 27165/27166 · Beacon 15000 · RCON 21114。镜像走私有 ACR(本机无法访问 Docker Hub)。网络模式 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需:① 建目录 /srv/squad/inst1 并 chown 1000:1000;② 首启会下载约 14GB;③ 下载完成后在 ServerConfig/Rcon.cfg 里设 Password 否则 RCON 不启动。", + "description": "游戏 7787/7788 · 查询 27165/27166 · Beacon 15000 · RCON 21114 · 目录 /srv/squad/inst1。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst1 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", "image": "http://mcsmanager.com/package-images/squad.jpg", "gameType": "Squad", - "category": "实例 1", + "category": "实例 01-08", "runtime": "Linux", "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", "size": "约 14GB(游戏本体运行时下载)", "targetLink": "", - "author": "自建 — 基于 MCSManager 官方模板修正", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", "tags": [ "Docker", - "ACR", - "实例1", - "host网络" + "host网络", + "实例01" ], "setupInfo": { "startCommand": "./SquadGameServer.sh Port=7787 QueryPort=27165 RCONPORT=21114 beaconport=15000 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", @@ -78,23 +77,22 @@ } }, { - "title": "Squad 专用服务器 — 实例 2", + "title": "Squad 实例 02", "language": "zh_cn", "platform": "Linux", - "description": "端口已预排,可与其他实例并存。游戏 7797/7798 · 查询 27175/27176 · Beacon 15010 · RCON 21124。镜像走私有 ACR(本机无法访问 Docker Hub)。网络模式 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需:① 建目录 /srv/squad/inst2 并 chown 1000:1000;② 首启会下载约 14GB;③ 下载完成后在 ServerConfig/Rcon.cfg 里设 Password 否则 RCON 不启动。", + "description": "游戏 7797/7798 · 查询 27175/27176 · Beacon 15010 · RCON 21124 · 目录 /srv/squad/inst2。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst2 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", "image": "http://mcsmanager.com/package-images/squad.jpg", "gameType": "Squad", - "category": "实例 2", + "category": "实例 01-08", "runtime": "Linux", "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", "size": "约 14GB(游戏本体运行时下载)", "targetLink": "", - "author": "自建 — 基于 MCSManager 官方模板修正", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", "tags": [ "Docker", - "ACR", - "实例2", - "host网络" + "host网络", + "实例02" ], "setupInfo": { "startCommand": "./SquadGameServer.sh Port=7797 QueryPort=27175 RCONPORT=21124 beaconport=15010 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", @@ -148,23 +146,22 @@ } }, { - "title": "Squad 专用服务器 — 实例 3", + "title": "Squad 实例 03", "language": "zh_cn", "platform": "Linux", - "description": "端口已预排,可与其他实例并存。游戏 7807/7808 · 查询 27185/27186 · Beacon 15020 · RCON 21134。镜像走私有 ACR(本机无法访问 Docker Hub)。网络模式 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需:① 建目录 /srv/squad/inst3 并 chown 1000:1000;② 首启会下载约 14GB;③ 下载完成后在 ServerConfig/Rcon.cfg 里设 Password 否则 RCON 不启动。", + "description": "游戏 7807/7808 · 查询 27185/27186 · Beacon 15020 · RCON 21134 · 目录 /srv/squad/inst3。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst3 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", "image": "http://mcsmanager.com/package-images/squad.jpg", "gameType": "Squad", - "category": "实例 3", + "category": "实例 01-08", "runtime": "Linux", "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", "size": "约 14GB(游戏本体运行时下载)", "targetLink": "", - "author": "自建 — 基于 MCSManager 官方模板修正", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", "tags": [ "Docker", - "ACR", - "实例3", - "host网络" + "host网络", + "实例03" ], "setupInfo": { "startCommand": "./SquadGameServer.sh Port=7807 QueryPort=27185 RCONPORT=21134 beaconport=15020 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", @@ -216,6 +213,1455 @@ "io": null } } + }, + { + "title": "Squad 实例 04", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7817/7818 · 查询 27195/27196 · Beacon 15030 · RCON 21144 · 目录 /srv/squad/inst4。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst4 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 01-08", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例04" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7817 QueryPort=27195 RCONPORT=21144 beaconport=15030 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst4", + "enableRcon": true, + "rconPort": 21144, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27195, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 05", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7827/7828 · 查询 27205/27206 · Beacon 15040 · RCON 21154 · 目录 /srv/squad/inst5。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst5 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 01-08", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例05" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7827 QueryPort=27205 RCONPORT=21154 beaconport=15040 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst5", + "enableRcon": true, + "rconPort": 21154, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27205, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 06", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7837/7838 · 查询 27215/27216 · Beacon 15050 · RCON 21164 · 目录 /srv/squad/inst6。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst6 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 01-08", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例06" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7837 QueryPort=27215 RCONPORT=21164 beaconport=15050 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst6", + "enableRcon": true, + "rconPort": 21164, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27215, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 07", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7847/7848 · 查询 27225/27226 · Beacon 15060 · RCON 21174 · 目录 /srv/squad/inst7。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst7 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 01-08", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例07" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7847 QueryPort=27225 RCONPORT=21174 beaconport=15060 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst7", + "enableRcon": true, + "rconPort": 21174, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27225, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 08", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7857/7858 · 查询 27235/27236 · Beacon 15070 · RCON 21184 · 目录 /srv/squad/inst8。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst8 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 01-08", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例08" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7857 QueryPort=27235 RCONPORT=21184 beaconport=15070 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst8", + "enableRcon": true, + "rconPort": 21184, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27235, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 09", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7867/7868 · 查询 27245/27246 · Beacon 15080 · RCON 21194 · 目录 /srv/squad/inst9。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst9 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例09" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7867 QueryPort=27245 RCONPORT=21194 beaconport=15080 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst9", + "enableRcon": true, + "rconPort": 21194, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27245, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 10", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7877/7878 · 查询 27255/27256 · Beacon 15090 · RCON 21204 · 目录 /srv/squad/inst10。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst10 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例10" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7877 QueryPort=27255 RCONPORT=21204 beaconport=15090 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst10", + "enableRcon": true, + "rconPort": 21204, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27255, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 11", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7887/7888 · 查询 27265/27266 · Beacon 15100 · RCON 21214 · 目录 /srv/squad/inst11。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst11 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例11" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7887 QueryPort=27265 RCONPORT=21214 beaconport=15100 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst11", + "enableRcon": true, + "rconPort": 21214, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27265, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 12", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7897/7898 · 查询 27275/27276 · Beacon 15110 · RCON 21224 · 目录 /srv/squad/inst12。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst12 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例12" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7897 QueryPort=27275 RCONPORT=21224 beaconport=15110 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst12", + "enableRcon": true, + "rconPort": 21224, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27275, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 13", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7907/7908 · 查询 27285/27286 · Beacon 15120 · RCON 21234 · 目录 /srv/squad/inst13。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst13 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例13" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7907 QueryPort=27285 RCONPORT=21234 beaconport=15120 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst13", + "enableRcon": true, + "rconPort": 21234, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27285, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 14", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7917/7918 · 查询 27295/27296 · Beacon 15130 · RCON 21244 · 目录 /srv/squad/inst14。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst14 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例14" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7917 QueryPort=27295 RCONPORT=21244 beaconport=15130 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst14", + "enableRcon": true, + "rconPort": 21244, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27295, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 15", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7927/7928 · 查询 27305/27306 · Beacon 15140 · RCON 21254 · 目录 /srv/squad/inst15。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst15 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例15" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7927 QueryPort=27305 RCONPORT=21254 beaconport=15140 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst15", + "enableRcon": true, + "rconPort": 21254, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27305, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 16", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7937/7938 · 查询 27315/27316 · Beacon 15150 · RCON 21264 · 目录 /srv/squad/inst16。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst16 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 09-16", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例16" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7937 QueryPort=27315 RCONPORT=21264 beaconport=15150 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst16", + "enableRcon": true, + "rconPort": 21264, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27315, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 17", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7947/7948 · 查询 27325/27326 · Beacon 15160 · RCON 21274 · 目录 /srv/squad/inst17。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst17 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例17" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7947 QueryPort=27325 RCONPORT=21274 beaconport=15160 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst17", + "enableRcon": true, + "rconPort": 21274, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27325, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 18", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7957/7958 · 查询 27335/27336 · Beacon 15170 · RCON 21284 · 目录 /srv/squad/inst18。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst18 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例18" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7957 QueryPort=27335 RCONPORT=21284 beaconport=15170 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst18", + "enableRcon": true, + "rconPort": 21284, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27335, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 19", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7967/7968 · 查询 27345/27346 · Beacon 15180 · RCON 21294 · 目录 /srv/squad/inst19。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst19 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例19" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7967 QueryPort=27345 RCONPORT=21294 beaconport=15180 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst19", + "enableRcon": true, + "rconPort": 21294, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27345, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 20", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7977/7978 · 查询 27355/27356 · Beacon 15190 · RCON 21304 · 目录 /srv/squad/inst20。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst20 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例20" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7977 QueryPort=27355 RCONPORT=21304 beaconport=15190 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst20", + "enableRcon": true, + "rconPort": 21304, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27355, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 21", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7987/7988 · 查询 27365/27366 · Beacon 15200 · RCON 21314 · 目录 /srv/squad/inst21。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst21 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例21" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7987 QueryPort=27365 RCONPORT=21314 beaconport=15200 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst21", + "enableRcon": true, + "rconPort": 21314, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27365, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 22", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 7997/7998 · 查询 27375/27376 · Beacon 15210 · RCON 21324 · 目录 /srv/squad/inst22。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst22 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例22" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=7997 QueryPort=27375 RCONPORT=21324 beaconport=15210 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst22", + "enableRcon": true, + "rconPort": 21324, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27375, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 23", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 8007/8008 · 查询 27385/27386 · Beacon 15220 · RCON 21334 · 目录 /srv/squad/inst23。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst23 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例23" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=8007 QueryPort=27385 RCONPORT=21334 beaconport=15220 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst23", + "enableRcon": true, + "rconPort": 21334, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27385, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } + }, + { + "title": "Squad 实例 24", + "language": "zh_cn", + "platform": "Linux", + "description": "游戏 8017/8018 · 查询 27395/27396 · Beacon 15230 · RCON 21344 · 目录 /srv/squad/inst24。端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。创建后需 ① mkdir -p /srv/squad/inst24 && chown 1000:1000 ② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password,否则服务端不启动 RCON。", + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + "category": "实例 17-24", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": [ + "Docker", + "host网络", + "实例24" + ], + "setupInfo": { + "startCommand": "./SquadGameServer.sh Port=8017 QueryPort=27395 RCONPORT=21344 beaconport=15230 FIXEDMAXPLAYERS=50 FIXEDMAXTICKRATE=50", + "stopCommand": "^C", + "updateCommand": "/home/steam/steamcmd/steamcmd.sh -net_ipv4 +force_install_dir \"/data\" +login anonymous \"+app_update 403240 validate\" +quit", + "ie": "utf8", + "oe": "utf8", + "fileCode": "utf8", + "type": "steam/universal", + "tag": [ + "Squad" + ], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": "/srv/squad/inst24", + "enableRcon": true, + "rconPort": 21344, + "rconIp": "127.0.0.1", + "pingConfig": { + "ip": "127.0.0.1", + "port": 27395, + "type": 1 + }, + "eventTask": { + "autoStart": false, + "autoRestart": true, + "ignore": false + }, + "terminalOption": { + "haveColor": false, + "pty": true + }, + "docker": { + "image": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "updateCommandImage": "squaddocker.azurecr.cn/steam-game-runtime:latest", + "networkMode": "host", + "ports": [], + "memory": 6144, + "changeWorkdir": true, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": null, + "network": null, + "io": null + } + } } ] } diff --git a/scripts/gen-market.py b/scripts/gen-market.py new file mode 100755 index 0000000..45b1c6d --- /dev/null +++ b/scripts/gen-market.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python3 +""" +生成 MCSManager 自定义市场 JSON —— 为每个 Squad 实例预排好端口。 + +为什么需要自建市场:官方市场自带的 Squad Docker 模板有三个问题, +在「无法访问 Docker Hub + 多实例」场景下必然失败。详见 PANEL.md §2。 + +用法: + ./gen-market.py # 默认 24 个模板 + ./gen-market.py 48 # 生成 48 个 + ./gen-market.py 24 - # 输出到 stdout 而非写文件 + + SQUAD_IMAGE=<私有仓库>/steam-game-runtime:latest ./gen-market.py + +端口排布(每实例 +10): + 游戏 7787 + 10(N-1) 并占用 +1 + 查询 27165 + 10(N-1) 并占用 +1 + Beacon 15000 + 10(N-1) + RCON 21114 + 10(N-1) + +间隔取 10 是因为游戏端口和查询端口各占 N 和 N+1 两个,只差 1 会重叠。 + +实例数上限 606 —— 四组端口各自从常规基址递增,最先相撞的是 +RCON(21114 起)追上查询基址(27165):(27165-21114)/10 + 1 = 606。 +超过这个数就必须重新规划基址,否则不同实例的不同服务会抢同一端口。 +""" + +import json +import os +import sys + +BASE = {"port": 7787, "query": 27165, "beacon": 15000, "rcon": 21114} +STEP = 10 +# 相邻两组基址的最小间距决定上限:RCON(21114) 追上 query(27165) +MAX_INSTANCES = (BASE["query"] - BASE["rcon"]) // STEP + 1 # = 606 + +IMAGE = os.environ.get( + "SQUAD_IMAGE", "squaddocker.azurecr.cn/steam-game-runtime:latest") +DATA_ROOT = os.environ.get("SQUAD_DATA_ROOT", "/srv/squad") +MEM_MB = int(os.environ.get("SQUAD_MEM_MB", "6144")) +MAXPLAYERS = int(os.environ.get("SQUAD_MAXPLAYERS", "50")) + +UPDATE_CMD = ('/home/steam/steamcmd/steamcmd.sh -net_ipv4 ' + '+force_install_dir "/data" +login anonymous ' + '"+app_update 403240 validate" +quit') + + +def ports_for(n): + off = (n - 1) * STEP + return {k: v + off for k, v in BASE.items()} + + +def package(n): + p = ports_for(n) + cwd = f"{DATA_ROOT}/inst{n}" + return { + "title": f"Squad 实例 {n:02d}", + "language": "zh_cn", + "platform": "Linux", + "description": ( + f"游戏 {p['port']}/{p['port']+1} · 查询 {p['query']}/{p['query']+1} · " + f"Beacon {p['beacon']} · RCON {p['rcon']} · 目录 {cwd}。" + f"端口已预排,可与其他实例并存。镜像走私有仓库(本机访问不了 Docker Hub);" + f"网络 host(Squad 硬要求,bridge 下游戏内浏览器搜不到服务器)。" + f"创建后需 ① mkdir -p {cwd} && chown 1000:1000 " + f"② 首启下载约 14GB ③ 下载完在 ServerConfig/Rcon.cfg 设 Password," + f"否则服务端不启动 RCON。" + ), + "image": "http://mcsmanager.com/package-images/squad.jpg", + "gameType": "Squad", + # 分组:每 8 个一档,免得市场列表里一长条没法找 + "category": f"实例 {((n - 1) // 8) * 8 + 1:02d}-{((n - 1) // 8 + 1) * 8:02d}", + "runtime": "Linux", + "hardware": "每实例 1 物理核 + 6GB 内存 + 20GB 磁盘", + "size": "约 14GB(游戏本体运行时下载)", + "targetLink": "", + "author": "自建 — 修正 MCSManager 官方 Squad 模板", + "tags": ["Docker", "host网络", f"实例{n:02d}"], + "setupInfo": { + # 官方模板这里是裸的 ./SquadGameServer.sh,不带端口参数, + # 多开时第二个实例会抢第一个的端口 + "startCommand": ( + f"./SquadGameServer.sh Port={p['port']} QueryPort={p['query']} " + f"RCONPORT={p['rcon']} beaconport={p['beacon']} " + f"FIXEDMAXPLAYERS={MAXPLAYERS} FIXEDMAXTICKRATE=50"), + "stopCommand": "^C", # Squad 无 stop 命令,只能靠信号 + "updateCommand": UPDATE_CMD, + # Linux 上必须 utf8;官方模板在中文 Windows 环境下用 gbk,会乱码 + "ie": "utf8", "oe": "utf8", "fileCode": "utf8", + "type": "steam/universal", + "tag": ["Squad"], + "processType": "docker", + "runAs": "steam", + "crlf": 1, + "cwd": cwd, + "enableRcon": True, + "rconPort": p["rcon"], + "rconIp": "127.0.0.1", + # 官方模板默认 25565 是 Minecraft 的,Squad 要指向 Steam 查询端口 + "pingConfig": {"ip": "127.0.0.1", "port": p["query"], "type": 1}, + "eventTask": {"autoStart": False, "autoRestart": True, "ignore": False}, + "terminalOption": {"haveColor": False, "pty": True}, + "docker": { + "image": IMAGE, + "updateCommandImage": IMAGE, + "networkMode": "host", # 官方模板是 bridge,Squad 不工作 + "ports": [], # host 网络下端口映射无意义 + "memory": MEM_MB, # 0=无上限,小内存机会被 OOM 拖垮整机 + "changeWorkdir": True, + "workingDir": "/data", + "env": [], + "extraVolumes": [], + "networkAliases": [], + "cpusetCpus": "", + "cpuUsage": 0, + "maxSpace": None, + "network": None, + "io": None, + }, + }, + } + + +def main(): + count = int(sys.argv[1]) if len(sys.argv) > 1 else 24 + if not 1 <= count <= MAX_INSTANCES: + sys.exit(f"实例数须在 1..{MAX_INSTANCES} 之间。\n" + f"上限来自端口排布:RCON({BASE['rcon']}) 每实例 +{STEP}," + f"到第 {MAX_INSTANCES+1} 个就会撞上查询端口基址 {BASE['query']}。") + + market = { + "languages": [{"label": "中文", "value": "zh_cn", "path": ""}], + "packages": [package(n) for n in range(1, count + 1)], + } + out = json.dumps(market, ensure_ascii=False, indent=2) + "\n" + + # 默认写入仓库根的 mcsm-market.json;传 - 则输出到 stdout + if "-" in sys.argv[1:]: + sys.stdout.write(out) + else: + import pathlib + p = pathlib.Path(__file__).resolve().parent.parent / "mcsm-market.json" + p.write_text(out) + last = ports_for(count) + print(f"已写入 {p}") + print(f" 模板数 {count}(上限 {MAX_INSTANCES}) {p.stat().st_size} 字节") + print(f" 实例 1 游戏 {BASE['port']} 查询 {BASE['query']} " + f"Beacon {BASE['beacon']} RCON {BASE['rcon']}") + print(f" 实例 {count} 游戏 {last['port']} 查询 {last['query']} " + f"Beacon {last['beacon']} RCON {last['rcon']}") + print(f" 镜像 {IMAGE}") + + +if __name__ == "__main__": + main()