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

iphone-control:入口显式安装 rustls 的 ring provider

Derrorsa905427ad96c
diff --git a/Cargo.lock b/Cargo.lock
index 2134c8a..cbd11f8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2286,6 +2286,7 @@ dependencies = [
"ictl-device",
"ictl-mcp",
"ictl-sign",
+ "rustls",
"serde_json",
"tokio",
"tracing",
diff --git a/Cargo.toml b/Cargo.toml
index 8e5825b..dd1e199 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,6 +45,8 @@ idevice = { version = "=0.1.68", default-features = false, features = [
rmcp = { version = "=3.8.0", features = ["server", "transport-io"] }
tokio = { version = "=1.54.1", features = ["full"] }
reqwest = { version = "=0.13.5", default-features = false, features = ["json", "form", "rustls"] }
+# reqwest 带进 aws-lc-rs,idevice/plume_core 用 ring,两个都开时 rustls 不会自动选,入口处显式装 ring
+rustls = { version = "=0.23.46", default-features = false, features = ["ring"] }
quick-xml = "=0.42.0"
image = { version = "=0.25.10", default-features = false, features = ["png", "jpeg"] }
clap = { version = "=4.6.7", features = ["derive", "env"] }
diff --git a/apps/iphone-control/Cargo.toml b/apps/iphone-control/Cargo.toml
index b8aa58f..7c294a8 100644
--- a/apps/iphone-control/Cargo.toml
+++ b/apps/iphone-control/Cargo.toml
@@ -15,6 +15,7 @@ ictl-sign.workspace = true
clap.workspace = true
tokio.workspace = true
anyhow.workspace = true
+rustls.workspace = true
serde_json.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
diff --git a/apps/iphone-control/src/main.rs b/apps/iphone-control/src/main.rs
index ecba22c..f251ed8 100644
--- a/apps/iphone-control/src/main.rs
+++ b/apps/iphone-control/src/main.rs
@@ -75,6 +75,8 @@ enum PasscodeAction {
#[tokio::main]
async fn main() -> anyhow::Result<()> {
+ // 依赖树里 rustls 的 ring 和 aws-lc-rs 都开着,不装默认 provider 的话第一个 HTTPS 请求就 panic
+ let _ = rustls::crypto::ring::default_provider().install_default();
let cli = Cli::parse();
let quiet = matches!(cli.command, Command::Mcp);
tracing_subscriber::fmt()