common/vpnxprtproxy.c
// VPNPRTPROXY is being built for command-line / console use
//
VPNPRTPROXY is being built for command-line / console use
VPNPRTPROXY is being built for command - line / console use
static int useage(const char *progname)
{
    vpnx_log(0, "Usage: %s -c [-h][-v VID][-p PID][-l loglevel][-r remote-port][remote-host]\n", progname);
    vpnx_log(0, "   or: %s -s -a local-port [h][-v VID][-p PID][-l loglevel][-r remote-port][remote-host]\n\n", progname);
    vpnx_log(0, "  -c LAN->VPN client\n");
    vpnx_log(0, "       A USB connection is translated to a TCP connection to a remote host\n");
    vpnx_log(0, "       provided in the USB connection request. If the request does not contain\n");
    vpnx_log(0, "       a hostname, the remtoe-host/remote-port provided on the command line is used\n");
    vpnx_log(0, "    -h This help text\n");
    vpnx_log(0, "    -v look for this vendor id (VID) for the USB tunnel (default is 0x3F0)\n");
    vpnx_log(0, "    -p look for this this product id (PID) for the USB tunnel (default is 0x102)\n");
    vpnx_log(0, "    -r default port on remote host to access\n");
    vpnx_log(0, "    remote-host, if supplied, is the default remote host to connect to when a USB\n");
    vpnx_log(0, "    connection is initiated by the prt proxy and the request doesn't contain a host name\n");
    vpnx_log(0, "\n");
    vpnx_log(0, "       Example:\n");
    vpnx_log(0, "         %s -c -r22 vpnbasedhost\n", progname); 
    vpnx_log(0, "\n");
    vpnx_log(0, "       This will make ssh connections from a LAN based host to a host on your VPN possible\n"); 
    vpnx_log(0, "       using a command line (on the LAN host) like:\n");
    vpnx_log(0, "\n");
    vpnx_log(0, "         ssh -p 1234 username@usbtunnelhost\n"); 
    vpnx_log(0, "\n");
    vpnx_log(0, "       where usbtunnelhost is the USB tunnel and 1234 is the port the USB tunnel is serving on\n");
    vpnx_log(0, "\n");
    vpnx_log(0, "  -s VPN->LAN server\n");
    vpnx_log(0, "       Listen on local-port for TCP connections and translate them to\n");
    vpnx_log(0, "       USB connections to the USB tunnel, and then marshall TCP traffic via USB\n");
    vpnx_log(0, "       to the tunnel which will translate back TCP traffic on the LAN\n");
    vpnx_log(0, "    -a local port to listen on for TCP connections\n");
    vpnx_log(0, "    -r port on LAN remote host to access\n");
    vpnx_log(0, "    remote-host, if supplied, is remote host on LAN to connect to when a TCP connection\n");
    vpnx_log(0, "    is made to local-port. If not supplied, the default host configured for the USB tunnel is used\n");
    vpnx_log(0, "\n");
    vpnx_log(0, "       Example:\n");
    vpnx_log(0, "         %s -s -a2222 -r22 lanbasedhost\n", progname); 
    vpnx_log(0, "\n");
    vpnx_log(0, "       This will make ssh connections to landbasedhost on your LAN possible\n"); 
    vpnx_log(0, "       using a command line like:\n");
    vpnx_log(0, "\n");
    vpnx_log(0, "         ssh -p 2222 username@localhost\n"); 
    vpnx_log(0, "\n");
    return -1;
}
static int useage ( const char * progname ) { vpnx_log ( 0 , " \n " , progname ) ; vpnx_log ( 0 , " \n \n " , progname ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " , progname ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " , progname ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; vpnx_log ( 0 , " \n " ) ; return -1 ; }
VPNPRTPROXY is being built for command-line / console use
VPNPRTPROXY is being built for command - line / console use