************* DESCRIPTION *************
The development of this tools was based on ideas from iPHUC, a tool to establish a ftp-like connection via USB to the iPhone.

The iphone_tunnel patches in runtime library iTunesMobileDevice.dll and hooks functions send and recv used by the library redirecting the connection to the port indicated as a parameter.

Application 'iphone_tunnel.exe' accepts multiple connections and several instances (using different ports on the PC) can be runned simultaneously.


************* SETUP *************
The usage is very simple, only has 2 parameters, the port where you want to connect inside the iPhone (i.e. the port on iPhone's localhost) and the port where the tool will stay listening for connections on the PC. For example on your PC run:

iphone_tunnel.exe 22 22

In this example, if you connect using a ssh client to the machine serving the tunnel and inside iPhone your are running the OpenSSH server, your will open a ssh session. A step by step recipe for the ssh session follows:

- Install the OpenSSH server on your iPhone. 
- Install iTunes on your PC. 
- Download the binary or compile it from scratch using Borland C++ compiler. 
- Move iphone_tunnel.exe to where iTunesMobileDevice.dll is located (C:\Program Files\Common - Files\Apple\Mobile Device Support\bin) or move the DLL to the iphone_tunnel.exe folder. 
- Plug the USB to your PC and your iPhone. 
- Run on your PC iphone_tunnel.exe with parameters 22 and 22. 
- Start a ssh from a third computer to your PC. 