libimobiledevice / libusbmuxd

A client library to multiplex connections from and to iOS devices
https://libimobiledevice.org
GNU Lesser General Public License v2.1
574 stars 270 forks source link

iproxy erroring with RESULT_CONNREFUSED #126

Open kaiytech opened 2 years ago

kaiytech commented 2 years ago

Hi. I attempted to forward a port using iproxy

$ iproxy --udid xxxx --debug --debug 6002:6002
Creating listening port 6002 for device port 6002
waiting for connection

but after launching my tcp connection on my macbook, this is what I get:

New connection for 6002->6002, fd = 5
waiting for connection
Requesting connecion to USB device handle 4 (serial: xxxx), port 6002
[libusbmuxd] usbmuxd_connect: Reading connect result...
[libusbmuxd] usbmuxd_connect: Connect failed, Error code=3
Error connecting to device: No such file or directory

diving into the source code told me that error code 3 is a "Connection refused" message. It used to work just fine with older iOS version (14.something). We had to upgrade our devices for our product to the latest version, which is iOS 15.4.1. Now the problem occurs, but keep in mind I'm not 100% sure I remember if it worked after upgrading or did it break with the upgrade.

macOS specs: 2019 MacBook Pro. Intel Catalina 10.15.7 (can't upgrade OS because of compatibility of some tools)

iOS specs: iPhone SE 2nd gen iOS 15.4.1

Tell me if you need any more info and I'll share as much as my nda allows me to. Thanks!

mexmer commented 2 years ago

is application, that listens on specified port running on device? can you connect to that application port trough wifi?

from log seems to me, that nothing is listening inside phone on port you specified.