vphone-web README

The project's README from github.com/34306/vphone-web. As one markdown file: README.md.

vphone-web

I vibe code this repo so please if you had anything issue with AI then just skip it. (i vibed but still checking the function before sharing so it must be work fine)

A self-hosted web platform for running multiple virtual iPhones at once in the browser — user accounts + RBAC, per-user device assignment, live screen streaming (WebRTC with an MJPEG/WebSocket fallback), touch & hardware-key input, IPA/TIPA install, an in-browser root shell and a file browser, on top of the vphone-cli engine (Apple Virtualization.framework, PV=3 research VMs).

You need build the vphone-cli and create your own base VM locally, i did not included it here due to large files.


Requirements


1. Clone (recursive)

git clone --recursive https://github.com/34306/vphone-web.git
cd vphone-web

This also creates vendor/vphone-cli/ with the full engine + toolchain.

2. Build the vphone-cli engine

cd vendor/vphone-cli
make setup_tools     # brew deps, build toolchain, create its Python venv
make build           # build + sign the vphone-cli binary
make bundle          # app bundle (bundles the IPA signing cert) — recommended
cd ../..

3. Create a base VM

Each web VM is an instant copy-on-write clone of a base VM directory. Build one with vphone-cli's automated pipeline (downloads IPSW + cloudOS, restores, patches, installs CFW, first boot).

See vendor/vphone-cli/README.md for the full firmware matrix, supported iOS/cloudOS builds, variants (regular / dev / jb / exp), and how to resolve IPSW URLs. When it finishes, the base lives at vendor/vphone-cli/vm/ (contains Disk.img, nvram.bin, SEPStorage, config.plist, AVPBooter*.bin, .vphoned.signed).

Tip — one base per iOS version. Keep each version's base in its own folder (vm/, vm-26.5/, vm-27/, …) and point the matching VPHONE_BASE_VM* env var at it. The web only offers versions whose Disk.img actually exists.

Boot cleanly. Always Stop a VM from the web UI (or Ctrl-C the process) and let it finish shutting down before copying/promoting a base — a hard kill leaves the APFS volume dirty and the next boot does a slow fsck replay.

4. Configure & run the web

cp .env.example .env          # then edit paths (see below)
make web_setup                # create .venv, install web deps
make web_seed_admin USER=admin PASS='choose-a-strong-password'
make web_run                  # serves http://127.0.0.1:8080

Open http://127.0.0.1:8080, sign in as the admin, then:

  1. Admin → Create VM — pick an iOS version; it clones the base instantly.
  2. Admin → assign the VM to one or more users.
  3. As a user: Start → Open → interact; drag on the screen for touch, use the home/power/volume buttons, or the SSH/Files tabs. Drop an .ipa/.tipa on the install zone to install.

Admin-only logs dashboard live-tails every VM at /logs.


5. (Optional) Expose it with a Cloudflare Tunnel

The server binds 127.0.0.1 only. To reach it from the internet without opening a port, use a Cloudflare Tunnel. You need a domain on Cloudflare.

brew install cloudflared
cloudflared tunnel login                      # authorize your domain (opens browser)
cloudflared tunnel create vphone              # creates a tunnel + credentials json
cloudflared tunnel route dns vphone phone.example.com   # your hostname

Create ~/.cloudflared/config.yml (replace the id + hostname with yours):

tunnel: <YOUR-TUNNEL-ID>
credentials-file: /Users/<you>/.cloudflared/<YOUR-TUNNEL-ID>.json
ingress:
  - hostname: phone.example.com
    service: http://localhost:8080
  - service: http_status:404

Run it:

cloudflared tunnel run vphone

Notes:

Auto-start on boot (macOS LaunchAgent, optional)

Run the web + tunnel automatically after a reboot/power-restore by creating two per-user LaunchAgents (~/Library/LaunchAgents/…) that RunAtLoad + KeepAlive: one execs make web_run (or uvicorn directly) from this repo, the other execs cloudflared tunnel run vphone. Web VMs need a GUI login session (WindowServer), so use a LaunchAgent (per-user), not a system LaunchDaemon; enable macOS Automatic Login for a fully unattended restore.


Credits

Built on vphone-cli by Lakr233. This repo adds the web platform layer on top.

vphone-web (34306/vphone-web)

Searching Database…

这是什么?这是一个自托管的 Web 平台,可以在浏览器中同时运行多台虚拟 iPhone,具备用户账号、RBAC、实时屏幕串流、触控输入、IPA 安装、root shell 和文件浏览器,构建在 vphone-cli 引擎之上,使用 Apple 的 Virtualization.framework。
它是独立应用,还是架在其他东西之上的一个层?它是一个 Web 层(用 uvicorn/make 运行的服务器),架在真正执行 iOS 虚拟化的 vphone-cli 引擎之上;这个仓库只是在引擎上面添加了多用户浏览器界面。
怎么把它跑起来?递归克隆仓库拉取 vendor/vphone-cli,构建 vphone-cli 引擎,通过 vphone-cli 的自动下载/恢复/修补流水线创建基础虚拟机,然后配置并运行 Web 服务器,以管理员身份登录来创建和分配虚拟机。
需要特定的 Mac 吗,还是任何机器都行?需要 Apple Silicon 上的 macOS 15+(Sequoia),因为它依赖 PV=3 私有虚拟化,此外还要禁用 SIP 和 AMFI,并安装 Xcode 命令行工具、Homebrew 和 Python 3.11+。
它自带开箱即用的虚拟 iPhone 镜像吗?不带——由于文件体积太大,基础虚拟机不包含在内;你必须自己构建 vphone-cli 并运行它的流水线(下载 IPSW + cloudOS、恢复、修补、首次启动)来创建自己的基础镜像,之后 Web 界面才能从它克隆虚拟机。
多个人可以共用同一套部署吗?可以——它带有基于角色的访问控制的用户账号和按用户分配设备的功能,管理员创建虚拟机并分配给特定用户,每个用户随后各自拥有自己的设备。
能安全地把它暴露到互联网上吗?服务器默认只绑定 127.0.0.1;要远程访问,你需要用自己的域名设置 Cloudflare Tunnel,而且由于 Cloudflare 无法代理 WebRTC UDP,实时视频会自动回退为 MJPEG-over-WebSocket。
vphone-cli 是什么,它和这个仓库是什么关系?vphone-cli(作者 Lakr233)是通过 Apple 私有的 Virtualization.framework API 真正执行 iOS 虚拟化的底层引擎;vphone-web 只是在它之上添加了一个多用户 Web 前端。
怎么在虚拟 iPhone 上安装应用?把 .ipa 或 .tipa 文件拖到虚拟机 Web 界面的安装区域即可;上传采用分块传输,以绕过代理的请求体大小限制。
我该相信这些代码真的能用吗?作者称代码是“氛围编程”(vibe coding)的产物,说分享前检查过功能,但也提醒跳过 AI 生成的 issue 报告——所以请把它当作实验性的社区维护代码来看待。
虚拟机的存储选择有影响吗?有影响——虚拟机镜像要放在内置 SSD 上,不要放在慢速的外接/USB 磁盘上,因为 iOS 首次启动会进行数千次小写入,在慢速存储上慢得离谱。
Creator
34306
Size
0.2 MB
Stars
374
Updated
CommitSep 05
Age
1mo
Commits · 90 Days