LinuxCommandLibrary

iproxy

Tunnel connections to iOS devices over USB

TLDR

Bind a local TCP port and forward it to a port on the connected USB device

$ iproxy [local_port]:[device_port]
copy

Bind multiple local TCP ports and forward them to the respective ports on the connected USB device
$ iproxy [local_port1]:[device_port1] [local_port2]:[device_port2]
copy

Bind a local port and forward it to a specific device by UDID
$ iproxy --udid [device_udid] [local_port]:[device_port]
copy

Bind a local port and forward it to a network-connected device with WiFi sync enabled
$ iproxy --network [local_port]:[device_port]
copy

SYNOPSIS

iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT

PARAMETERS

LOCAL_TCP_PORT
    The local TCP port number to bind to on your computer. Traffic sent to this port will be forwarded to the device.

DEVICE_TCP_PORT
    The TCP port number on the iOS device to forward traffic to. This is the port on the iPhone/iPad that the service you want to access is listening on.

DESCRIPTION

iproxy is a command-line utility that establishes a TCP connection between a local port on your computer and a port on a connected iPhone or iPad.

It's primarily used for debugging and developing iOS applications, particularly when you need to forward network traffic, such as SSH or other services, to the device. iproxy creates a local proxy, allowing you to interact with services running on the iOS device as if they were running directly on your machine. This is helpful because iOS devices usually only expose services on localhost, and you don't have direct network access to them from your desktop without a workaround. It's part of the libimobiledevice suite, which provides tools for interacting with iOS devices without requiring iTunes. The device must be connected to your computer via USB, and a running 'usbmuxd' process is required to manage the USB connection between your computer and the iDevice. Commonly, this tool is used for SSH tunneling or debugging web pages running on Safari on iOS by forwarding the Safari developer tools port.

CAVEATS

Requires libimobiledevice and usbmuxd to be installed and running.
The device must be connected via USB.

USAGE EXAMPLE

To forward port 22 (SSH) from your iPhone to local port 2222:
iproxy 2222 22

You can then connect to your iPhone via SSH using:
ssh root@localhost -p 2222

HISTORY

iproxy is part of the libimobiledevice suite, a long-standing project aimed at enabling communication with iOS devices without relying on proprietary software like iTunes.

It's been widely used by developers, researchers, and enthusiasts for various purposes, including debugging, reverse engineering, and accessing device services over a network. Its initial purpose was mainly facilitating development on iOS devices by providing basic network capabilities for debugging through a local proxy.

SEE ALSO

Copied to clipboard