Methods
-
start( callback, error )
-
Description
start function of the proxy create a new TCP Server gives every new client a uuid bind listener from proxy and target run callback after every connection
Parameters
Name Type Description callbackfunction [opt] func will be called with every new con
errorfunction [opt] error handler
Details
-
close( [ callback ] )
-
Description
shut down the server and run callback
Parameters
Name Type Attributes Description callbackfunction <optional> Details
-
<static> run( options [, callback [, errorFunc ] ] )
-
Description
static one line function to create a proxy (like in the first version)
Parameters
Name Type Attributes Description optionsObject Settings for the proxy
Name Type Description proxyObject Proxy server information
Name Type Description hostString Proxy IP
portNumber Proxy Port
targetObject Target server information
Name Type Description hostString Target IP
portNumber Target Port
callbackfunction <optional> callback(proxySocket, clientSocket) => {}; runs after every new connection
errorFuncfunction <optional> error handler
Details