mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
Rewrite TCP stack for multiple streams
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
// Print out all the RemoteXPC services
|
||||
|
||||
use clap::{Arg, Command};
|
||||
use idevice::{core_device_proxy::CoreDeviceProxy, xpc::RemoteXpcClient, IdeviceService};
|
||||
use idevice::{
|
||||
core_device_proxy::CoreDeviceProxy, tcp::stream::AdapterStream, xpc::RemoteXpcClient,
|
||||
IdeviceService,
|
||||
};
|
||||
|
||||
mod common;
|
||||
|
||||
@@ -63,10 +66,13 @@ async fn main() {
|
||||
let rsd_port = proxy.handshake.server_rsd_port;
|
||||
|
||||
let mut adapter = proxy.create_software_tunnel().expect("no software tunnel");
|
||||
adapter.connect(rsd_port).await.expect("no RSD connect");
|
||||
adapter.pcap("new_xpc.pcap").await.unwrap();
|
||||
let conn = AdapterStream::connect(&mut adapter, rsd_port)
|
||||
.await
|
||||
.expect("no RSD connect");
|
||||
|
||||
// Make the connection to RemoteXPC
|
||||
let mut client = RemoteXpcClient::new(Box::new(adapter)).await.unwrap();
|
||||
let mut client = RemoteXpcClient::new(Box::new(conn)).await.unwrap();
|
||||
|
||||
println!("{:#?}", client.do_handshake().await);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user