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 callback
function [opt] func will be called with every new con
error
function [opt] error handler
Details
-
close( [ callback ] )
-
Description
shut down the server and run callback
Parameters
Name Type Attributes Description callback
function <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 options
Object Settings for the proxy
Name Type Description proxy
Object Proxy server information
Name Type Description host
String Proxy IP
port
Number Proxy Port
target
Object Target server information
Name Type Description host
String Target IP
port
Number Target Port
callback
function <optional> callback(proxySocket, clientSocket) => {}; runs after every new connection
errorFunc
function <optional> error handler
Details