imkira / mobiledevice

Command line utility for interacting with Apple's Private (Closed) Mobile Device Framework
MIT License
672 stars 135 forks source link

Seems tunnel has broken? #14

Closed CodeLife2012 closed 7 years ago

CodeLife2012 commented 7 years ago

Currently I use 2.0.0, but failed to use mobiledevice tunnel in two device, all log out

Failed to bind to port 22!

Can I enable verbose log to figure out what really happened?

imkira commented 7 years ago

Can you try ports equal to or above 1024?

CodeLife2012 commented 7 years ago

I always port to 2222 or other larger value

CodeLife2012 commented 7 years ago

Any way to enable verbose log? @imkira

imkira commented 7 years ago

What do you mean by "port to 2222" ? Your error message shows "port 22". The binding is to a local port (on your mac).

You can enable verbosity by changing the program to print out the error code returned by the bind/listen calls:

https://github.com/imkira/mobiledevice/blob/8134c5e7edd97bf718490eaadb3639bda276e596/tunnel.m#L275-L276

Since the problem is a local error it seems to me you either have no permissions to listen on a <1024 port or the port is simply already in use. Please check that first.

CodeLife2012 commented 7 years ago

Sorry, seems I make a mistake by bind device 2222 to local 22, it should be tunnel 2222 22, I make a wrong assume of the from to port. Thanks for you reply.

imkira commented 7 years ago

Nice! I'm closing this assuming you're already found the solution to your problem.