A proxy server and format converter for the QSYS QRC protocol.
Can be used to proxy over Websockets for browser-based control. Or as a simple TCP pass-through proxy for logging and observing communications.
$ npm install -g qsys-qrc-proxy
Via Command line:
qsys-qrc-proxy 127.0.0.1 --ws-port 8083 # proxy over websockets on port 8083
# or
qsys-qrc-proxy 127.0.0.1 --tcp-port 6000 --log # proxy over tcp on port 6000, and log traffic
Via API:
import qsysQrcProxy from 'qsys-qrc-proxy';
qsysQrcProxy(
'127.0.0.1', // The IP address or hostname of a QSYS core with QRC enabled.
{
wsPort: 8083 // The port this server will expose a websocket on.
}
)
qsysQrcProxy(remoteIP: string, {wsPort?: number, tcpPort?: number, log?: boolean, remotePort?: number})
Type: string
The IP address or hostname of a QSYS core with QRC enabled.
Type: number
Default: 1710
The TCP port the QRC service is exposed on. Should be 1710
unless there's some funky port forwarding between the proxy and the core.
Type: number
Must specify at least one. Specifies which port this server will serve the proxied communications on.
wsPort
will proxy over websockets.
tcpPort
will proxy a raw QRC stream (useful for using the log feature to inspect traffic).
Type: boolean
Default: false
If true
, will log the traffic to standard out.
Usage:
$ qsys-qrc-proxy <core-ip> [options]
Options:
--remote-port, -r QRC port on core (defaults to 1710)
--ws-port, -w Socket to proxy via websocket
--tcp-port, -t Socket to proxy with raw TCP
--log, -l Log communications to stdout
Note: Must choose ws-port or tcp-port or both