1prtunnel tunnels TCP connections through an HTTP or SOCKS5 proxy server.
2It is useful if you're behind such a proxy and want to use a program
3that doesn't have native proxy support.
5It's developed on Slackware Linux and OpenBSD (both x86), and should work
6on any other Unix-like system.
8prtunnel was written by Josh Beam <email@example.com> and is distributed under
9a BSD-style license (see prtunnel.h or any other source file for the exact
10terms). The latest version can be found at
16 prtunnel [options] <local port> [<remote host> <remote port>]
18<local port> is the local port you want prtunnel to listen to; <remote host>
19is the name or address of the remote system you want to connect to;
20<remote port> is the port of the service you want to use on <remote host>.
22If run without the <remote host> and <remote port> arguments, prtunnel
23will accept SOCKS4/SOCKS5 commands from the client to determine the
24remote server to connect to.
27 -D Run as a daemon. prtunnel will run in the background
28 and accept multiple TCP connections with this option.
29 -V Verbose output (prints all data transferred to standard
31 -c Use color to differentiate between incoming and outgoing
32 data in verbose output; without this, each line of outgoing
33 verbose output will begin with ">>> " and incoming output
34 with "<<< "
35 -6 Enables IPv6 mode. This doesn't affect the way outgoing
36 connections are made with the direct/direct6 tunneling
37 modes; direct will always connect with IPv4 and direct6
38 will always connect with IPv6.
39 -t <tunnel mode> Set tunneling mode; http (default), socks5, direct and
40 direct6 are supported. With http and socks5, you must
41 specify the address of an http/socks5 proxy to use.
42 direct will make prtunnel connect directly to the remote
43 host specified; direct6 does the same, but with IPv6
44 instead of IPv4.
45 -H <proxy host> Name or address of the proxy server you wish to use
46 -P <proxy port> Port that the proxy server uses (8080 default for http,
47 1080 default for socks5)
48 -T <address> Add a trusted address. For security reasons, only localhost
49 is trusted by default. Only connections from trusted
50 addresses are allowed. You can specify an address itself
51 (like 10.0.0.1), or in the form of address/bitcheck, where
52 bitcheck is the number of leading bits to compare; for
53 example, 10.0.0.0/24 would mean any address in the range
54 of 10.0.0.0 to 10.0.0.255.
55 -u <username> Set proxy authentication username
56 -p <password> Set proxy authentication password
58 Prompt for proxy username and password
59 --http-1.0 Use HTTP/1.0 instead of HTTP/1.1 for HTTP connections
60 --telnet-keep-alive <interval>
61 Causes prtunnel to send keep-alive data at the
62 specified interval, using the telnet NOP command
63 --crlf-keep-alive <interval>
64 Causes prtunnel to send keep-alive data at the
65 specified interval, using a CRLF
66 --irc-auto-pong Causes prtunnel to automatically respond to PING commands
67 sent by IRC servers
68 --timeout <time>
69 Allows you to set a client socket timeout; if no data
70 is recieved from the client for <time> seconds, the
71 connection will be closed
72 --server-timeout <time>
73 Allows you to set a server socket timeout; if no data
74 is recieved from the remote host for <time> seconds,
75 the connection will be closed
76 -h, --help Print help message
77 -v, --version Show version information
79Here's an example:
80 prtunnel -H proxy 6667 irc.freenode.net 6667
81After starting prtunnel like this, you could then point an IRC client to
82127.0.0.1, and prtunnel will attempt to connect you to irc.freenode.net
83via the HTTP proxy server on a system named "proxy".