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

new port format not backwards compatible #98

Closed paradite closed 3 years ago

paradite commented 4 years ago

the commit that changed the format https://github.com/libimobiledevice/libusbmuxd/commit/3ae1cbbfb3b21af9ab1bc749b6a2681a3a3334ec was not backwards compatible as it claimed. old format:

$ iproxy
usage: iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT [UDID]

this works correctly:

$ iproxy 8001 8001 7af24cbfe52bdf7be67b20d61409297521a76458
waiting for connection

new format:

Usage: iproxy [OPTIONS] LOCAL_PORT:DEVICE_PORT [LOCAL_PORT2:DEVICE_PORT2 ...]

this breaks and throws error:

$ iproxy 8001 8001 7af24cbfe52bdf7be67b20d61409297521a76458
Invalid listen port specified in argument '8001'!

this is tested on macOS with brew install usbmuxd.

paradite commented 4 years ago

for anyone looking for a temporary solution:

brew unlink usbmuxd
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/afce634843e7c5c4ec9be88479d1f6631ba9ac4a/Formula/libusbmuxd.rb
brew switch usbmuxd 2.0.1

# if there is libplist error:
brew unlink libplist
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/a5561705c81aa5279992353fe1a9836acc59d53d/Formula/libplist.rb
brew switch libplist 2.0.0
bottotl commented 3 years ago

iproxy [OPTIONS] LOCAL_PORT:DEVICE_PORT [LOCAL_PORT2:DEVICE_PORT2 ...] 变成这样了

nikias commented 3 years ago

The old format works when you don't pass the udid as 3rd argument (could still be passed as -u <UDID>). But just use the new format, I don't see the point in reverting to an old version 😆🤷‍♂️