Commit Graph

11 Commits

  • feat(v1.2.0): 改为「微信 + Chromium 浏览器」,Telegram/自定义暂缓
    Telegram 仅 x86_64,暂不做(代码留休眠)。聚焦多架构通用的 Chromium:
    - Dockerfile apt 装 chromium(Debian Bookworm,amd64/arm64 均有;本地 arm64 实测装成、
      chromium --version 正常,镜像 +~0.5GB)。Chromium 随镜像就绪,autostart 直接以
      --no-sandbox 软件渲染拉起,无需「下载安装」。
    - 新建实例选择器:微信(默认) + 浏览器(Chromium) 可用;自定义标「即将支持」禁用;去掉 Telegram。
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
  • feat(v1.2.0): 多应用平台——创建实例时选 微信/Telegram(+Chromium/自定义占位)
    镜像层(向后兼容,微信路径零改动):
    - app-defs.sh:按 appType 给出 APP_BIN/APP_LAUNCH/APP_NAME(缺省回退微信)。
    - app-ctl.sh:通用安装/状态分发;wechat 委托回 wechat-ctl.sh;telegram 下载官方 portable tar.xz。
    - autostart:读 /config/.woc-app 选择启动哪个应用,读不到回退微信(老实例零改动)。
    - 02-woc-app 钩子:把容器环境 WOC_APP_TYPE 落到 /config/.woc-app(缺则不写→回退微信)。
    - Dockerfile:加 xz-utils(telegram 解压)+ COPY 新脚本。
    
    后端:envList 透传 WOC_APP_TYPE(+自定义启动命令);triggerWechat/wechatStatus 改走
    app-ctl.sh <appType>(微信行为不变);创建实例路由接受 appType。
    
    前端:新建实例对话框加「应用类型」选择器(微信默认 / Telegram;Chromium、自定义标记"即将支持"禁用)。
    
    本轮 Telegram(x86_64) 端到端可用;Chromium(待 apt 烤镜像) 与 自定义(待上传流) 下一轮。
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
  • chore(docker): 00-woc-identity 也用显式 chmod 755(补齐 #17)
    PR #17 把脚本权限改为显式 755/644 以摆脱构建机 umask 影响,但它之后才加的
    00-woc-identity 钩子仍是 chmod +x,是唯一漏网。该钩子由 root 运行(711 也能跑、
    非功能性问题),此处仅为与其余几行统一、彻底做到与 umask 无关。
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
  • fix(P0): unique persistent machine-id per instance + manual reset
    All instances shared the image-baked machine-id (a67bf09f...), so Tencent
    saw every WechatOnCloud account worldwide as one "device" — a textbook
    device-farm signal triggering risk control and the forced-logout loop
    reported across old and new versions.
    
    - docker/woc-identity.sh: new /custom-cont-init.d/00-woc-identity hook —
      generates a unique machine-id on first start, persists it in the data
      volume (survives restart/upgrade/recreate), writes /etc/machine-id +
      /var/lib/dbus/machine-id, removes /.dockerenv. Existing instances get a
      fresh unique id on first upgraded start (volume lacks the file).
    - regenInstanceMachineId + POST /api/admin/instances/:id/regen-machine-id:
      roll a brand-new device id and restart, for accounts re-flagged by risk
      control. Gated on the hook being present (old image → instructs upgrade).
    - Admin 实例卡片「安全」弹窗新增「重置设备 ID 并重启」。
    
    Verified: two fresh containers get distinct machine-ids; id persists across
    restart; regen (rm persisted file + restart) yields a new persistent id.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>