Proxy

Sets up a proxy server for use by the remote tunnel server

Constructor

new Proxy(options)

Manages proxy for tunneling hosts to connect

Parameters:
NameTypeDescription
optionsobject
Properties
NameTypeAttributesDefaultDescription
idstring

Unique ID for this proxy

loggerObject<optional>
console

Logger to use

Methods

clean()

Cleans up waiting and open connections

pop(socketHandler)

Returns a connected socket off the list to process a request and places it back when the handler is finished

Parameters:
NameTypeDescription
socketHandlerProxy~socketHandler

push(socket)

Processes incoming connections from tunnel client

Parameters:
NameTypeDescription
socketnet.Socket

Raw socket from an incoming connection

Type Definitions

socketHandler(socket)

Parameters:
NameTypeDescription
socketnet.Socket

The socket back to the client

Proxy~socketHandlerCallback

socketHandlerCallback(error)

Parameters:
NameTypeDescription
errorError | null

Possible error during handling