Control a real USB-connected iPhone from Linux (no Mac, no paid developer account) and expose it to AI agents as MCP tools
Rust ai-agentautomationclaudeclaude-codedockeriosiphonelinuxmcpmcp-servermodel-context-protocolrustwebdriveragent
发布:0.1.4,操作安全、超时与恢复、iPad 兼容修复和依赖安全更新 (#22)
Qinghe Lidaad8338fed5
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlindex c397dcc..69038b9 100644--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -39,7 +39,7 @@ body:id: versionattributes:label: Version or commit / 版本或提交- placeholder: v0.1.3, or the output of `git rev-parse --short HEAD`+ placeholder: v0.1.4, or the output of `git rev-parse --short HEAD`- type: textareaid: doctorattributes:diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c956016..e016261 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,8 @@ All notable changes to this project are documented here. The format is based on## [Unreleased]+## [0.1.4] - 2026-11-07+### Security- Updated the `zip` crate to 9.4.1 (from 8.6.0, and 2.6.1 in the vendored apple-codesign) for GHSA-m665-v7pm-7grj, GHSA-q7v9-x93c-xqv3, GHSA-hjqx-j4rw-g7xv, GHSA-9hj8-73fh-9963 and GHSA-8hxf-qr8p-62x4. iphone-control only unpacks the checksum-verified WebDriverAgent package from Appium, so the practical exposure was small.@@ -30,6 +32,9 @@ All notable changes to this project are documented here. The format is based on- `doctor` counts only iPhones, iPads and iPods as phones on USB; an Apple keyboard no longer passes the check.- The system-alert check after an action is no longer skipped when the tapped element's text happens to contain the words "系统弹窗".- Auto-unlock now also recognizes leftover WDA wait settings from an interrupted swipe or poll and restores the defaults.+- iPad: when WebDriverAgent was started while the iPad was locked, it keeps reporting "not locked", and a dark Touch ID lock screen with notifications has no lock marker in the element tree. Auto-unlock used to trust WDA from then on and never unlock; such an ambiguous screen is now treated as possibly locked (unlocked automatically when a passcode is set, shown as "possibly locked" in `status`).+- iPad: rows in the floating sidebar of iPadOS 26 apps such as Settings can be tapped by name again; the empty sidebar-sized containers behind the list were mistaken for something covering it.+- When WDA drops between two health checks, errors say it just dropped instead of showing the state as "ready".## [0.1.3] - 2026-11-07@@ -97,7 +102,8 @@ First public release.- Docker image (single binary plus Debian's usbmuxd, not privileged) with a generated third-party license list, published to `ghcr.io/derrors/iphone-control` for linux/amd64 and linux/arm64.- Running without Docker, from source or from the prebuilt Linux binaries (x86_64, aarch64): as a regular user with the system usbmuxd, XDG data and socket paths, the unsigned WebDriverAgent downloaded and checksum-verified before the first signing, `mcp-config` printing a direct command, and a systemd user service.-[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.1.3...HEAD+[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.1.4...HEAD+[0.1.4]: https://github.com/Derrors/iphone-control/compare/v0.1.3...v0.1.4[0.1.3]: https://github.com/Derrors/iphone-control/compare/v0.1.2...v0.1.3[0.1.2]: https://github.com/Derrors/iphone-control/compare/v0.1.1...v0.1.2[0.1.1]: https://github.com/Derrors/iphone-control/compare/v0.1.0...v0.1.1diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.mdindex ecdcb98..abb3991 100644--- a/CHANGELOG.zh-CN.md+++ b/CHANGELOG.zh-CN.md@@ -6,6 +6,8 @@## [Unreleased]+## [0.1.4] - 2026-11-07+### 安全- `zip` 升级到 9.4.1(原来是 8.6.0,vendor 的 apple-codesign 里是 2.6.1),修复 GHSA-m665-v7pm-7grj、GHSA-q7v9-x93c-xqv3、GHSA-hjqx-j4rw-g7xv、GHSA-9hj8-73fh-9963、GHSA-8hxf-qr8p-62x4。iphone-control 只解压核对过 sha256 的 Appium 官方 WDA 包,实际受影响的可能很小。@@ -30,6 +32,9 @@- `doctor` 只把 iPhone、iPad、iPod 算作 USB 上的手机,接着苹果键盘时不再误报。- 点到的元素文字里正好含“系统弹窗”时,操作后的弹窗检查不再被跳过。- 自动解锁也能认出滑动、轮询中途被打断后残留的 WDA 等待设置,并恢复默认值。+- iPad:WebDriverAgent 在 iPad 锁屏时启动会一直报“未锁”,而 Touch ID 机型熄屏、有通知时的锁屏上又没有锁的标记,以前会因此一直相信 WDA、永远不自动解锁。现在认不出时按可能锁着处理:配置了密码就自动解锁,`status` 显示“可能已锁屏”。+- iPad:设置等 iPadOS 26 App 的浮动侧栏里的项目又能按名字点了,以前把列表背后和侧栏一样大的空容器误当成遮挡。+- WDA 在两次巡检之间掉线时,提示改为“刚掉线”,不再显示成“就绪”。## [0.1.3] - 2026-11-07@@ -95,7 +100,8 @@- `setup`、`doctor`、`status`、`mcp-config`、`wda-bridge`、`notify-test` 命令。- Docker 镜像(非 privileged,linux/amd64、linux/arm64);也可不用 Docker,从源码或预编译二进制以普通用户运行,附 systemd 用户服务。-[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.1.3...HEAD+[Unreleased]: https://github.com/Derrors/iphone-control/compare/v0.1.4...HEAD+[0.1.4]: https://github.com/Derrors/iphone-control/compare/v0.1.3...v0.1.4[0.1.3]: https://github.com/Derrors/iphone-control/compare/v0.1.2...v0.1.3[0.1.2]: https://github.com/Derrors/iphone-control/compare/v0.1.1...v0.1.2[0.1.1]: https://github.com/Derrors/iphone-control/compare/v0.1.0...v0.1.1diff --git a/Cargo.lock b/Cargo.lockindex 43b6b10..d6465f5 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1947,7 +1947,7 @@ dependencies = [[[package]]name = "ictl-daemon"-version = "0.1.3"+version = "0.1.4"dependencies = ["anyhow","base64 0.23.1",@@ -1967,7 +1967,7 @@ dependencies = [[[package]]name = "ictl-device"-version = "0.1.3"+version = "0.1.4"dependencies = ["idevice","plist",@@ -1981,7 +1981,7 @@ dependencies = [[[package]]name = "ictl-mcp"-version = "0.1.3"+version = "0.1.4"dependencies = ["anyhow","ictl-protocol",@@ -1992,7 +1992,7 @@ dependencies = [[[package]]name = "ictl-protocol"-version = "0.1.3"+version = "0.1.4"dependencies = ["libc","serde",@@ -2002,7 +2002,7 @@ dependencies = [[[package]]name = "ictl-sign"-version = "0.1.3"+version = "0.1.4"dependencies = ["plist","plume_core",@@ -2015,7 +2015,7 @@ dependencies = [[[package]]name = "ictl-unlock"-version = "0.1.3"+version = "0.1.4"dependencies = ["ictl-wda","serde_json",@@ -2027,7 +2027,7 @@ dependencies = [[[package]]name = "ictl-wda"-version = "0.1.3"+version = "0.1.4"dependencies = ["base64 0.23.1","ictl-device",@@ -2238,7 +2238,7 @@ dependencies = [[[package]]name = "iphone-control"-version = "0.1.3"+version = "0.1.4"dependencies = ["anyhow","clap",diff --git a/Cargo.toml b/Cargo.tomlindex d54f28f..1f609a9 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -15,7 +15,7 @@ members = [exclude = ["vendor"][workspace.package]-version = "0.1.3"+version = "0.1.4"edition = "2024"# rmcp 3.8 要求 1.88;Impactor/idevice 用 edition 2024rust-version = "1.88"diff --git a/README.md b/README.mdindex a8ba372..4aeba9e 100644--- a/README.md+++ b/README.md@@ -79,7 +79,7 @@ claude mcp add iphone -s user -- docker exec -i iphone-control iphone-control mc**macOS** (Docker can't pass USB through on a Mac, so run the binary directly)```bash-V=v0.1.3 # latest release+V=v0.1.4 # latest releasecurl -fsSL https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz | tar xzmkdir -p ~/.local/bin && install -m 755 iphone-control-$V-macos-arm64/iphone-control ~/.local/bin/echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile && source ~/.zprofilediff --git a/README.zh-CN.md b/README.zh-CN.mdindex e5072f6..464722a 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -79,7 +79,7 @@ claude mcp add iphone -s user -- docker exec -i iphone-control iphone-control mc**macOS**(Mac 上的 Docker 不能直通 USB,直接运行二进制)```bash-V=v0.1.3 # 最新版本号+V=v0.1.4 # 最新版本号curl -fsSL https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz | tar xzmkdir -p ~/.local/bin && install -m 755 iphone-control-$V-macos-arm64/iphone-control ~/.local/bin/echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile && source ~/.zprofilediff --git a/website/deploy/docker.md b/website/deploy/docker.mdindex 5a656f2..95ad2c1 100644--- a/website/deploy/docker.md+++ b/website/deploy/docker.md@@ -13,7 +13,7 @@```yamlservices:iphone:- image: ghcr.io/derrors/iphone-control:latest # 或固定版本,例如 :0.1.3+ image: ghcr.io/derrors/iphone-control:latest # 或固定版本,例如 :0.1.4container_name: iphone-control# 只开放 USB 字符设备,不需要 privilegeddevice_cgroup_rules:@@ -57,7 +57,7 @@ docker compose up -d --build镜像在 `ghcr.io/derrors/iphone-control`(amd64、arm64)。在 `.env` 里设:```ini-IMAGE=ghcr.io/derrors/iphone-control:latest # 或固定版本,例如 :0.1.3+IMAGE=ghcr.io/derrors/iphone-control:latest # 或固定版本,例如 :0.1.4```然后:diff --git a/website/deploy/macos.md b/website/deploy/macos.mdindex fa3763e..1e02005 100644--- a/website/deploy/macos.md+++ b/website/deploy/macos.md@@ -24,7 +24,7 @@ Docker Desktop 在 Mac 上把容器跑在 Linux 虚拟机里,不支持 USB 直从 0.1.2 起,[Releases](https://github.com/Derrors/iphone-control/releases) 里有 macOS(Apple Silicon,macOS 11 以上)的压缩包 `iphone-control-<版本>-macos-arm64.tar.gz`。在终端里下载安装(把 `V` 换成最新版本号):```bash-V=v0.1.3+V=v0.1.4curl -fsSLO https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gzcurl -fsSLO https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz.sha256shasum -a 256 -c iphone-control-$V-macos-arm64.tar.gz.sha256 # 应显示 OKdiff --git a/website/en/deploy/docker.md b/website/en/deploy/docker.mdindex 273853d..3b13306 100644--- a/website/en/deploy/docker.md+++ b/website/en/deploy/docker.md@@ -13,7 +13,7 @@ No need to clone the repository — the least effort. Create a directory (e.g. ````yamlservices:iphone:- image: ghcr.io/derrors/iphone-control:latest # or pin a version, e.g. :0.1.3+ image: ghcr.io/derrors/iphone-control:latest # or pin a version, e.g. :0.1.4container_name: iphone-control# USB character devices only; no privileged neededdevice_cgroup_rules:@@ -57,7 +57,7 @@ docker compose up -d --buildImages are published at `ghcr.io/derrors/iphone-control` (amd64, arm64). In `.env`:```ini-IMAGE=ghcr.io/derrors/iphone-control:latest # or pin a version, e.g. :0.1.3+IMAGE=ghcr.io/derrors/iphone-control:latest # or pin a version, e.g. :0.1.4```Then:diff --git a/website/en/deploy/macos.md b/website/en/deploy/macos.mdindex a093caf..6eb7494 100644--- a/website/en/deploy/macos.md+++ b/website/en/deploy/macos.md@@ -24,7 +24,7 @@ Docker Desktop on a Mac runs containers in a Linux VM without USB passthrough, sSince 0.1.2, [Releases](https://github.com/Derrors/iphone-control/releases) has a macOS archive (Apple Silicon, macOS 11+): `iphone-control-<version>-macos-arm64.tar.gz`. Download and install it from a terminal (set `V` to the latest version):```bash-V=v0.1.3+V=v0.1.4curl -fsSLO https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gzcurl -fsSLO https://github.com/Derrors/iphone-control/releases/download/$V/iphone-control-$V-macos-arm64.tar.gz.sha256shasum -a 256 -c iphone-control-$V-macos-arm64.tar.gz.sha256 # should print OK