Skip to content

Control a real USB-connected iPhone from Linux (no Mac, no paid developer account) and expose it to AI agents as MCP tools

修复:自建 anisette 服务地址(ICTL_ANISETTE_URL)不生效

Derrors8f1de116235a
diff --git a/THIRD_PARTY.md b/THIRD_PARTY.md
index 5adeb53..31c2edc 100644
--- a/THIRD_PARTY.md
+++ b/THIRD_PARTY.md
@@ -10,7 +10,7 @@
| [apple-codesign](https://github.com/indygreg/apple-platform-rs) | 0.29.0(取自 Impactor `3rdparty/apple-codesign-0.29.0`) | MPL-2.0 | `vendor/apple-codesign`,`[patch.crates-io]` | Impactor 的 0o755 权限补丁(上游提交 428b42f);本仓库删掉了上游的 `tests/`、`docs/`、`Cargo.lock`、`Cargo.toml.orig`,Cargo.toml 去掉 `[[test]]` 目标,源码未改 |
| [Impactor](https://github.com/claration/impactor) `plume_core` | v2.7.2(提交 b13d99559febd63e3710dfdd0ef8cdd78d10ae13) | MPL-2.0 | `vendor/plume_core` | 源码未改;Cargo.toml 把 workspace 继承展开成显式版本、修正 omnisette 路径;reqwest 用 `rustls-no-provider`(不编 aws-lc-rs);omnisette 改为 `default-features = false, features = ["remote-anisette", "remote-anisette-v3"]` |
| Impactor `plume_store` | 同上 | MIT | `vendor/plume_store` | 源码未改;Cargo.toml 展开 workspace 继承 |
-| Impactor `omnisette` | 同上 | MPL-2.0 | `vendor/omnisette` | 源码未改;Cargo.toml 展开 workspace 继承;reqwest 用 `rustls-no-provider`;本地 anisette(StoreServicesCore,要苹果 Android 版的 `libstoreservicescore.so` 和没有许可证声明的 git 依赖 `android-loader`)改成可选 feature `local-anisette`,默认 feature 里保留与上游一致,本项目不启用(只用远程 anisette v3) |
+| Impactor `omnisette` | 同上 | MPL-2.0 | `vendor/omnisette` | `src/lib.rs` 加了 `anisette_url_v3()`/`set_anisette_url_v3()`(原来 v3 地址没有 setter,自建 anisette 服务配不进去;改动处有注释,文件仍是 MPL-2.0);Cargo.toml 展开 workspace 继承;reqwest 用 `rustls-no-provider`;本地 anisette(StoreServicesCore,要苹果 Android 版的 `libstoreservicescore.so` 和没有许可证声明的 git 依赖 `android-loader`)改成可选 feature `local-anisette`,默认 feature 里保留与上游一致,本项目不启用(只用远程 anisette v3) |
| Impactor `plume_utils` | 同上 | MIT | 未 vendor;`crates/ictl-sign/src/bundle.rs` 改写自其 `bundle.rs` | 增加 `BundleType::XCTest`,修复 `.xctest` 漏签 |
| idevice tools | v0.1.68 | MIT | `crates/ictl-device/src/media.rs`、`hid.rs` 的按键/键码表改写自 `tools/src/coredevice_stream.rs`、`hid.rs` | 去掉日志、改错误类型 |
| [WebDriverAgent](https://github.com/appium/WebDriverAgent) | v16.15.3(Appium 官方构建,sha256 2176793538d9…) | BSD-3-Clause | 镜像构建时下载校验,打成未签名 IPA;计划改为本项目 macOS CI 编译 | 不嵌入苹果框架 |
diff --git a/crates/ictl-sign/src/lib.rs b/crates/ictl-sign/src/lib.rs
index e1aa727..e7b71e6 100644
--- a/crates/ictl-sign/src/lib.rs
+++ b/crates/ictl-sign/src/lib.rs
@@ -69,8 +69,9 @@ impl AccountDir {
fn anisette(&self) -> AnisetteConfiguration {
let c = AnisetteConfiguration::default().set_configuration_path(self.dir.clone());
+ // 启用的是 v3 provider,它只看 v3 地址;原来设的是用不到的 v1 地址,自建服务不生效
match &self.anisette_url {
- Some(url) => c.set_anisette_url(url.clone()),
+ Some(url) => c.set_anisette_url_v3(url.clone()),
None => c,
}
}
@@ -261,6 +262,15 @@ fn restrict_tree(dir: &Path) -> std::io::Result<()> {
#[cfg(test)]
mod tests {
use super::*;
+
+ /// 自建 anisette 服务地址要落到 v3 provider 实际读的字段上(原来设到 v1 字段,不生效)
+ #[test]
+ fn custom_anisette_url_reaches_v3_provider() {
+ let dir = AccountDir { dir: PathBuf::from("/tmp/x"), anisette_url: Some("https://ani.example.com".into()) };
+ assert_eq!(dir.anisette().anisette_url_v3(), "https://ani.example.com");
+ let default = AccountDir { dir: PathBuf::from("/tmp/x"), anisette_url: None };
+ assert_eq!(default.anisette().anisette_url_v3(), "https://mac-ani.jkcoxson.com");
+ }
use std::time::{Duration, SystemTime};
#[test]
diff --git a/docs/licensing.md b/docs/licensing.md
index 307f8b7..ce7eecb 100644
--- a/docs/licensing.md
+++ b/docs/licensing.md
@@ -14,7 +14,7 @@
| jktcp 0.1.8 | 用户态 TCP(idevice 间接依赖) | MIT | 间接依赖 | 同上 |
| plume_core(Impactor) | Apple ID、开发者 API、描述文件、证书 | **MPL-2.0**(目录内 LICENSE) | vendor 到 `vendor/plume_core`,源码未改,只改了 Cargo.toml(workspace 继承、reqwest 不带 aws-lc-rs、omnisette 只开远程 anisette) | 以 MPL-2.0 随仓库提供源码;文件头保留 |
| plume_store(Impactor) | 账号会话存储 | MIT(Impactor 根 LICENSE) | vendor 到 `vendor/plume_store`,源码未改 | 保留版权声明(`vendor/plume_store/LICENSE-MIT-Impactor`) |
-| omnisette(Impactor 3rdparty) | anisette 数据 | **MPL-2.0**(目录内 LICENSE;早期文档误写为 MIT,读源码后更正) | vendor 到 `vendor/omnisette`,源码未改;Cargo.toml 把本地 anisette 改成可选 feature `local-anisette`,本项目不启用,所以不编译没有许可证声明的 `android-loader`/`sysv64` 和 AGPL-3.0 的 `remove-async-await` | 同 plume_core |
+| omnisette(Impactor 3rdparty) | anisette 数据 | **MPL-2.0**(目录内 LICENSE;早期文档误写为 MIT,读源码后更正) | vendor 到 `vendor/omnisette`,`src/lib.rs` 加了 v3 服务地址的 getter/setter(自建 anisette 服务才能生效),其余源码未改;Cargo.toml 把本地 anisette 改成可选 feature `local-anisette`,本项目不启用,所以不编译没有许可证声明的 `android-loader`/`sysv64` 和 AGPL-3.0 的 `remove-async-await` | 同 plume_core |
| plume_utils(Impactor) | Bundle、Signer | MIT(Impactor 根 LICENSE) | **未 vendor**:`ictl-sign/src/bundle.rs` 改写自它的 `bundle.rs`,签名流程在 `ictl-sign/src/lib.rs` 重写 | 文件头注明来源和版权 |
| apple-codesign 0.29.0 | 代码签名 | **MPL-2.0** | vendor 到 `vendor/apple-codesign`(Impactor 打过 0o755 权限补丁的副本;去掉了上游的 tests/、docs/),经 `[patch.crates-io]` 替换 | 以 MPL-2.0 随仓库提供源码 |
| rmcp 3.8.0 | MCP SDK | Apache-2.0(部分历史代码 MIT) | crates.io 依赖 | 保留 NOTICE/版权声明 |
diff --git a/vendor/omnisette/src/lib.rs b/vendor/omnisette/src/lib.rs
index 354ccec..a9d6748 100644
--- a/vendor/omnisette/src/lib.rs
+++ b/vendor/omnisette/src/lib.rs
@@ -98,6 +98,18 @@ impl AnisetteConfiguration {
self
}
+ // iphone-control: the v3 provider reads anisette_url_v3, which had no setter, so a custom
+ // server could not be configured (set_anisette_url only changes the unused v1 field).
+ pub fn anisette_url_v3(&self) -> &String {
+ &self.anisette_url_v3
+ }
+
+ // iphone-control: see anisette_url_v3 above.
+ pub fn set_anisette_url_v3(mut self, anisette_url_v3: String) -> AnisetteConfiguration {
+ self.anisette_url_v3 = anisette_url_v3;
+ self
+ }
+
pub fn set_macos_serial(mut self, macos_serial: String) -> AnisetteConfiguration {
self.macos_serial = macos_serial;
self