rpipe − remote pipe multiplexer
rpipe [−sv] [−a IPADDR] [−g GROUP[,GROUP...]] [−n NUMBER] [−u USER] [−p FILE] ARG...
rpipe −h | −V
The rpipe tool is a simple TCP multiplexer that makes it possible to send data over the network to the standard input of a selected program on the remote machine much as one would do it using pipe.
The program operates in two modes: server and client.
In server mode (requested by the −s command line option), it listens for TCP requests at the indicated IP address and port (default: port 1 on all available network interfaces). The first command line argument is treated as full pathname of the command on the server and the rest of arguments as initial arguments for that command.
Upon receiving an incoming connection, its first line is split into words and appended to the command line constructed as described above. The resulting command line is then run and the rest of incoming data is supplied to it as its standard input.
The server replies with an RFC 1078 compliant response line and waits for the program to terminate. Any data received over the network are piped to the program’s standard input. The program standard output is captured and sent back to the client. During transmission, each linefeed character (LF, ASCII 10) is replaced by two characters: newline (CR, ASCII 13) and linefeed. A dot appearing at the beginning of a line is duplicated. End of program output is marked with a <CRLF>.<CRLF> marker. When the program terminates, its exit status (as returned by wait(2)) is formatted in decimal and sent over the network, followed by <CRLF>. This allows for the client to exit with the same status as the remote program.
In client mode, rpipe sends its argument as the first line of the request immediately followed by its standard input. Any data received from the remote end is first decoded by reverting the encoding described above and then reproduced on the standard output. The command will exit with the same exit status as returned by the remote program. If an error occurred, it will exit with code 69 (EX_UNAVAILABLE), or 71 (EX_OSERR), depending on the error.
In server mode: define IP address and port to listen on. Either IPADDR or PORT, but not both, can be omitted. If PORT is omitted, it defaults to 1 (the tcpmux service). In this case column is optional. If IPADDR is omitted, it defaults to 0.0.0.0 (i.e. listen on all interfaces) and the semicolon is mandatory.
If this option is not used, the IP address is obtained from the environment variable RPIPE_ADDRESS. If it is not set, the default 0.0.0.0:1 is used.
In client mode, this option defines the IP address (and optional port) to send data to. At least the IPADDR portion must be present. If not set, the IP address will be obtained from the environment variable RPIPE_ADDRESS. If it is not set, an error is signaled.
In server mode. Run the command with GROUP as the primary owner group. If more than one GROUPs are supplied, the surplus ones will be set as the supplementary groups. Each GROUP can be either a symbolic group name, or a numeric GID preceded by a plus sign.
See also the −u option.
Print a short help summary and exit.
Valid in server mode only. Set maximum number of simultaneous connections. Default is 128.
Valid in server mode only. Read run-time execution privileges for the command from FILE. Each non-empty line in FILE consists of two or more words separated by whitespace. The first word is a subcommand name, the second one is the user name to run subcommand as, and remaining words are groups to run as. Comments are introduced with the hash sign and extend up to the end of the line. Before running the command, the first argument from the command line obtained from client is looked up in that file. If found, the rest of fields gives the privileges to run the constructed command with. If not found, user and group supplied by −u and −g options (if given) will be used.
Enable server mode.
In server mode. Run the command with the privileges of USER, which is either a symbolic user name or a numeric UID (in decimal), preceded by a plus sign.
Print program version and copyright information and exit.
Increase verbosity level.
IP address and optional port to listen to (in server mode), or to connect (in client mode).
The program is intended for deployment in a secure environment. No authorization is performed. No data encryption is implemented.
Report bugs to <email@example.com>.
© 2019 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Manpage server at man.gnu.org.ua.
Powered by mansrv 1.1