libimobiledevice-win32 / libimobiledevice-vs

Visual Studio solution to build all of libimobiledevice at once
GNU Lesser General Public License v2.1
89 stars 62 forks source link

could add new feature like android adb forward unix domian socket?, forwarding tcp packets through host machine port to ios device's unix domian socket #21

Open janksenhu opened 3 years ago

janksenhu commented 3 years ago

current iproxy not surpport forwarding unix domain socket

janksenhu commented 3 years ago

====================android adb forward============= in android app creat unix socket: serverSocket= new LocalServerSocket("android.net.LocalNativeSocket");

could forward like: adb forward tcp:8080 localabstract:android.net.LocalNativeSocket ,works fine

forward [--no-rebind] LOCAL REMOTE forward socket connection using: tcp: ( may be "tcp:0" to pick any open port) localabstract: localreserved: localfilesystem: dev: jdwp: (remote only) acceptfd: (listen only)

=====================iproxy win10============= win10 cmd like:

usage: iproxy.exe LOCAL_TCP_PORT DEVICE_TCP_PORT [UDID] [TCP|UNIX]

LOCAL_TCP_PORT: The TCP port to open on the host machine DEVICE_TCP_PORT: The TCP port to which to connect on the device UDID: The UDID of the device to which to connect [TCP|UNIX]: The socket protocol to use to connect to usbmuxd. Can only be specified in combination with UDID.

win10 host machine port is 8080 , iphone 11 tcp socket server listen 127.0.0.1 5566

iproxy.exe 8080 5566 00008030-000A492A14C3802E TCP ,woks fine

==============iproxy cmd format different with macOS, Linux:======================== ERROR: Not enough parameters. Need at least one pair of ports. Usage: iproxy [OPTIONS] LOCAL_PORT:DEVICE_PORT [LOCAL_PORT2:DEVICE_PORT2 ...]

Proxy that binds local TCP ports to be forwarded to the specified ports on a usbmux device.

OPTIONS: -u, --udid UDID target specific device by UDID -n, --network connect to network device -l, --local connect to USB device (default) -s, --source ADDR source address for listening socket (default 127.0.0.1) -h, --help prints usage information -d, --debug increase debug level -v, --version prints version information

Homepage: https://libimobiledevice.org Bug Reports: https://github.com/libimobiledevice/libusbmuxd/issues