Skip to content

v2.0.0

Latest

Choose a tag to compare

@StarAwA117 StarAwA117 released this 15 Nov 06:26
· 62 commits to main since this release

MCWSLoader 2.0.0

稳定版 / Stable release

升级前建议备份 config.json、permission.json、mods/ 和自定义 Mod。

Back up config.json, permission.json, mods/ and custom Mods before upgrading.

2.0 主要更新 / 2.0 highlights

  • WebUI 全面迁移到 TypeScript。
    The WebUI is now fully written in TypeScript.
  • 全新液态玻璃界面,支持 Star 与 Catppuccin Mocha 主题。
    A new liquid-glass interface with Star and Catppuccin Mocha themes.
  • 服务状态卡片使用独立布局和主题化锯齿徽章。
    The service status card has a dedicated layout and a theme-aware scalloped badge.
  • 新增三种服务模式:both、webui、websocket。
    Added three server modes: both, webui and websocket.
  • 仅 WebUI 模式可以在仪表盘启动和停止 WebSocket。
    WebUI-only mode can start and stop WebSocket from the dashboard.
  • 新增应用内更新、预览版更新和版本回退。
    Added in-app updates, prerelease updates and version rollback.
  • 日志页只显示应用日志,消息日志保留在消息页面。
    The logs page shows application logs only; message logs remain in the Chat page.
  • 完整的 zh_CN、zh_TW 和 en_US 文本体系。
    Complete zh_CN, zh_TW and en_US text support.
  • Flutter WebView 壳和移动端连接设置。
    A Flutter WebView shell with mobile server setup.

安全与稳定性 / Security and stability

  • 未批准客户端不会成为主客户端。
    Pending clients can never become the main client.
  • WebUI 配置接口不再返回明文密码,登录后自动迁移为 scrypt 哈希。
    The config API no longer exposes plaintext passwords and migrates them to scrypt hashes after login.
  • 配置和权限文件使用原子写入并限制为 0600。
    Config and permission files are written atomically with 0600 permissions.
  • 空 JSON 请求体不会覆盖配置。
    Empty JSON bodies can no longer overwrite config.
  • 权限查询增加缓存和大小写不敏感比较。
    Permission lookups are cached and compare player names case-insensitively.
  • 日志关闭时等待缓冲落盘,日志流错误不再导致进程崩溃。
    Shutdown flushes log buffers and log stream errors no longer crash the process.
  • Mod 导入会校验 zip-slip、符号链接、文件数量、解压体积和原型污染。
    Mod imports validate zip-slip, symlinks, file count, extracted size and prototype pollution.
  • 覆盖安装失败时保留可用于手动恢复的旧版本备份。
    Failed overwrite installs keep the previous version backup for manual recovery.
  • 更新和依赖安装使用安全参数,不再执行破坏性的 git reset --hard。
    Updates and dependency installs use safe flags and no longer run destructive git reset --hard.
  • WebSocket 启停已串行化,避免并发请求造成端口竞争。
    WebSocket start and stop operations are serialized to avoid port races.
  • SAPI 重试定时器会在停止轮询时清理。
    SAPI retry timers are cleared when polling stops.
  • MCFunc 循环会跳过尚未结束的上一轮。
    MCFunc loops skip a tick while the previous execution is still running.

FastBuilder 安全沙箱 / FastBuilder sandbox

  • 移除 new Function 和 with 执行方式。
    Removed new Function and with execution.
  • 脚本在独立 VM 上下文中运行。
    Scripts run in a separate VM context.
  • 禁止 process、require、globalThis、Object、Reflect、Proxy、eval、Function 和动态 import。
    process, require, globalThis, Object, Reflect, Proxy, eval, Function and dynamic import are blocked.
  • 阻止 constructor、prototype、__proto__、call、apply、bind 等逃逸路径。
    Constructor, prototype, __proto__, call, apply and bind escape paths are blocked.
  • 脚本超时 5 秒,文件限制 256 KB,只允许 scripts/ 下的裸 .js 文件名。
    Scripts time out after five seconds, are limited to 256 KB and only accept bare .js names inside scripts/.
  • 这不是操作系统级隔离,只运行可信来源的脚本。
    This is not OS-level isolation. Only run scripts from trusted sources.

文本与界面 / Texts and interface

  • 命令解析、权限和 Tool 状态文本迁移到 texts。
    Command parsing, permission and Tool status text now use texts.
  • 语言和主题在保存成功后生效。
    Language and theme changes apply after a successful save.
  • 下拉菜单改为主题化组件,禁止原生弹窗和原生 select。
    Select menus use themed components; native dialogs and native selects are blocked.
  • 聊天发送失败会恢复输入内容。
    Failed chat sends restore the input.
  • 日志和聊天只在接近底部时自动跟随新内容。
    Logs and chat follow new content only when near the bottom.
  • Mod JSON 配置输入错误会显示提示。
    Invalid Mod JSON fields now show an inline error.
  • 弹窗支持 Escape 关闭并锁定背景滚动。
    Modals support Escape and lock background scrolling.

已知说明 / Notes

  • MCBE WebSocket 不响应 ping/pong,因此没有添加无意义的心跳探测。
    MCBE WebSocket does not respond to ping/pong, so no meaningless heartbeat probe is used.
  • ws.connection、端口和 mode 修改需要重启服务生效。
    Changes to ws.connection, ports and mode require a server restart.
  • WebSocket 默认只监听 127.0.0.1。局域网使用需要设置 ws.host 并配置 IP 白名单或批准流程。
    The default listener is 127.0.0.1. LAN use requires ws.host and the IP allowlist or approval flow.

升级 / Upgrade

git pull
npm install
npm start

从 1.3.0 或任意 2.0.0-beta 升级无需手动迁移。
No manual migration is required from 1.3.0 or any 2.0.0-beta.

完整变更 / Full changelog: v1.3.0...v2.0.0