3 .\" Manual for the simple packet streamer
5 .\" (c) 2008 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of Trivial IP Encryption (TrIPE).
12 .\" TrIPE is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU General Public License as published by the Free
14 .\" Software Foundation; either version 3 of the License, or (at your
15 .\" option) any later version.
17 .\" TrIPE is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with TrIPE. If not, see <https://www.gnu.org/licenses/>.
25 .\"--------------------------------------------------------------------------
26 .so ../common/defs.man \" @@@PRE@@@
28 .\"--------------------------------------------------------------------------
29 .TH pkstream 1 "23 April 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
31 .\"--------------------------------------------------------------------------
34 pkstream \- forward UDP packets over streams
36 .\"--------------------------------------------------------------------------
55 .\"--------------------------------------------------------------------------
60 program forwards UDP packets over some kind of reliable stream. It
61 understands TCP sockets natively; anything else has to be fudged up
62 using some kind of port forwarder like
66 etc. It's intended, among other things, to provide a transport for
68 packets where there are annoying firewalls in the way.
69 .SS "Command-line arguments"
74 pairs on the command-line are respectively the UDP port that
76 should listen on, and the port which it should receive packets from and
81 will parse packets from the stream attached to its standard input and
82 send them to its UDP peer; and it will write packets it reads from its
83 UDP port to the stream attached to its standard output. The program
84 will quit when its input stream closes.
86 This behaviour can be modified by passing suitable options:
89 Writes a brief description of the command-line options available to
90 standard output and exits with status 0.
95 version number to standard output and exits with status 0.
98 Writes a brief usage summary to standard output and exits with status 0.
100 .BI "\-l, \-\-listen=" port
101 Listen for connections on the given TCP
103 Only one connection is allowed at a time. When a connection is
104 accepted, forward UDP packets over the TCP stream until it closes; then
105 wait for another connection.
107 .BI "\-p, \-\-peer=" addr
108 Only accept TCP connections from
110 This option only makes sense in conjunction with
113 .BI "\-b, \-\-bind=" addr
116 above), only listen on the local address
118 When making a connection (see
122 as the source address rather than letting the kernel choose the address
123 automatically. This is useful when the other end will only accept
124 connections from a particular address and you get the wrong one otherwise.
126 .BI "\-c, \-\-connect=" addr : port
131 and forward packets over the TCP connection rather than using stdin and
134 .\"--------------------------------------------------------------------------
137 The stream protocol is very simple. Each packet is preceded by a
138 two-octet length field in network byte order. The length is number of
139 octets in the following packet (i.e., it does
141 include the length field itself). There is no padding between packets.
142 The only way a stream can be invalid is if it stops in the middle of a
145 .\"--------------------------------------------------------------------------
148 The code hasn't been audited. It may contain security bugs. If you
149 find one, please inform the author
152 .\"--------------------------------------------------------------------------
160 .\"--------------------------------------------------------------------------
163 Mark Wooding, <mdw@distorted.org.uk>
165 .\"----- That's all, folks --------------------------------------------------