Skip to content

Commit

Permalink
Add man pages for iproxy and inetcat
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed May 31, 2020
1 parent c04bb75 commit cdc9f26
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = common src include tools
SUBDIRS = common src include tools docs

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libusbmuxd.pc
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ common/Makefile
src/Makefile
include/Makefile
tools/Makefile
docs/Makefile
libusbmuxd.pc
])

Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
man_MANS = iproxy.1 inetcat.1

EXTRA_DIST = $(man_MANS)
54 changes: 54 additions & 0 deletions docs/inetcat.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.TH "inetcat" 1
.SH NAME
inetcat \- Opens a read/write interface via STDIN/STDOUT to a TCP port on a usbmux device
.SH SYNOPSIS
.B inetcat
[OPTIONS]
<DEVICE_TCP_PORT>
.SH DESCRIPTION
inetcat is a simple netcat-like tool that allows opening a read/write
interface to a TCP port on a usbmux device and exposing it via STDIN/STDOUT.
.SH OPTIONS
.TP
.B \-u, \-\-udid UDID
Target specific device by UDID. Note that if this option is \f[I]not\f[] specified,
inetcat will connect to the first device found.
.TP
.B \-n, \-\-network
Connect to network device. The device needs to have WiFi sync enabled and
needs to be paired with this computer for this to work. Please note that
a device might close connections at any time to save power.
This option will make inetcat connect to network attched devices only,
unless \f[B]-l\f[] is passed too (see below).
.TP
.B \-l, \-\-local
Connect to USB device. This is the default if no option is passed. If used
together with \f[B]-n\f[], inetcat will first attempt a connection to a device
attached via USB, and if not available attempt to reach a device via network.
.TP
.B \-h, \-\-help
Prints usage information.
.TP
.B \-d, \-\-debug
Increase debug level.
.SH EXAMPLE
Use ssh ProxyCommand to connect to a jailbroken iOS device via SSH:

$ ssh -oProxyCommand="inetcat 22" root@localhost

Used in SSH config file to connect to iOS Device:

$ cat ~/.ssh/config
Host myiphone
User root
ProxyCommand "icat 22 UDID_of_my_iphone"
$ ssh myiphone

.SH AUTHOR
Adrien Guinet
.SH SEE ALSO
iproxy(1)
.SH ON THE WEB
https://github.com/libimobiledevice/libusbmuxd

https://libimobiledevice.org
63 changes: 63 additions & 0 deletions docs/iproxy.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.TH "iproxy" 1
.SH NAME
iproxy \- A proxy that binds local TCP ports to be forwarded to the specified ports on a usbmux device
.SH SYNOPSIS
.B iproxy
[OPTIONS]
LOCAL_PORT:DEVICE_PORT [LOCAL_PORT2:DEVICE_PORT2 ...]
.SH DESCRIPTION
iproxy allows binding local TCP ports so that a connection to one (or more) of
the local ports will be forwarded to the specified port (or ports) on a usbmux
device.
.SH OPTIONS
.TP
.B \-u, \-\-udid UDID
Target specific device by UDID. Note that if this option is \f[I]not\f[] specified,
iproxy will make connection attempts to the first device found.
.TP
.B \-n, \-\-network
Connect to network device. The device needs to have WiFi sync enabled and
needs to be paired with this computer for this to work. Please note that
a device might close connections at any time to save power.
This option will make iproxy try to connect to network attched devices only,
unless \f[B]-l\f[] is passed too (see below).
.TP
.B \-l, \-\-local
Connect to USB device. This is the default if no option is passed. If used
together with \f[B]-n\f[], iproxy will first attempt a connection to a device
attached via USB, and if not available attempt to reach a device via network.
.TP
.B \-s, \-\-source ADDR
Allows setting a source address for the listening socket. The default is
127.0.0.1 (local connections only). While not needed in normal setups,
this option allows other than local connections, for example 0.0.0.0 would
make the TCP proxy port(s) accessible from other computers in the network.

\f[B]WARNING:\f[] Use with caution since this could expose a device over
the network!
.TP
.B \-h, \-\-help
Prints usage information.
.TP
.B \-d, \-\-debug
Increase debug level.
.SH EXAMPLES
.TP
.B iproxy 2222:44
Bind local TCP port 2222 and forward to port 44 of the first device connected via USB.
.TP
.B iproxy -u 3fac232fbdd684bdb1e3b65973922ae8b7db174a 2222:44
Bind local TCP port 2222 and forward to port 44 of the device with UDID
3fac232fbdd684bdb1e3b65973922ae8b7db174a connected via USB.
.TP
.B iproxy -n -u 3fac232fbdd684bdb1e3b65973922ae8b7db174a 2222:44 8080:8080
Bind local TCP ports 2222 and 8080 and forward to ports 44 and 8080 respectively
of the device with UDID 3fac232fbdd684bdb1e3b65973922ae8b7db174a connected via network.
.SH AUTHOR
Nikias Bassen
.SH SEE ALSO
inetcat(1)
.SH ON THE WEB
https://github.com/libimobiledevice/libusbmuxd

https://libimobiledevice.org

0 comments on commit cdc9f26

Please sign in to comment.