Highlights
🐛 Userspace tunnel: fail fast when the device disconnects
Unplugging the device (or otherwise losing the tunnel transport) used to leave in-flight developer commands over the in-process userspace tunnel — e.g. pymobiledevice3 developer dvt oslog — parked forever. The tunnel now watches its transport and tears everything down the moment it dies, so blocked reads surface a connection error within about a second.
🔒 Userspace tunnel: relay service connections over unix domain sockets
The dial plane's in-process relays previously listened on loopback TCP — an unauthenticated port any local process could connect to for the tunnel's whole lifetime, reaching the device's RSD/DVT/lockdown services through it. The relays now bind unix sockets in a private 0700 temp directory, so filesystem permissions decide who may connect. Loopback TCP remains the fallback on platforms without AF_UNIX (e.g. Windows). Throughput is unchanged (measured at parity in both directions), and idle tunnels no longer emit keep-alive chatter on the local hop.
🐛 Userspace tunnel: teardown robustness
A batch of teardown fixes for the dial plane: a dial racing teardown could hang Server.wait_closed() or leak relay state, a failed service-connection setup leaked the established connection, and RemoteXPCConnection.local_address crashed over the userspace tunnel instead of raising a clear error. All fixed, each with a regression test.
✨ PYMOBILEDEVICE3_USERSPACE_TCP_RELAY environment variable
Forces the userspace tunnel's relays onto loopback TCP even where unix sockets are available — reproduces the Windows relay path on any platform for debugging:
PYMOBILEDEVICE3_USERSPACE_TCP_RELAY=1 pymobiledevice3 developer dvt ls /What's Changed
- 5d07a55 userspace-tunnel: apply review findings (#1869) (@doronz88)
- 5927387 userspace-tunnel: tear down when the tunnel transport dies (#1869) (@doronz88)
- f7d23dd userspace-tunnel: env var to force loopback-TCP relays (#1869) (@doronz88)
- 1137a70 userspace-tunnel: relay dialed connections over unix domain sockets (#1869) (@doronz88)
Full Changelog: v10.11.1...v10.11.2