logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

vznnc - run a program connected to a socket

Description

       This "nano-netcat" utility can be used to either listen on or connect to a TCP port at localhost, and run
       a specified program with its stdin and stdout (or a specified file descriptor) connected to the socket.

Examples

       To run receiving side of ploopcopy command on a remote server, using openssh port forwarding:

        PORT=2345
        ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
            vznnc -l -p $PORT -- ploop copy -d $FILE -i0 -o1

       To do the same, but with stdin and stdout intact, using file descriptor 5 for communication:

        ssh -L localhost:$PORT:localhost:$PORT $REMOTE_SERVER \
            vznnc -l -p $PORT -f 5 -- ploop copy -d $FILE -i5 -o5

Exit Status

       Returns program exit status upon success, or one of the following codes in case of an error:

       1      Invalid usage

       127    Error executing program.

       220    Network-related error.

License

       Copyright (C) 2014, Parallels, Inc. Licensed under GNU GPL v2.

OpenVZ                                             29 May 2014                                          vznnc(8)

Name

       vznnc - run a program connected to a socket

Options

-l     Listen on a specified TCP port at localhost.

       -c     Connect to a specified TCP port at localhost.

       -pport
              Port number.

       -ffd  File  descriptor  ID.  If this option is not set, stdin and stdout are closed and are connected to
              the socket, otherwise they are left intact, and the specified fd is used.

       --     This is a separator between vznnc own arguments and program arguments, so  that  latter  won't  be
              processed by vznnc.  It is required in case there are any arguments to program that start with the
              dash (-) character, and is optional otherwise.

       program [ arg... ]
              Program to run, with optional arguments.

See Also

nc(3), netcat(3), socat(2).

Synopsis

vznnc { -l | -c } -pport [-ffd] [--] program [arg...]

See Also