Tunnel

Manages a group of connections that compose a tunnel

Constructor

new Tunnel(options)

Create a tunnel

Parameters:
NameTypeDescription
optionsobject
Properties
NameTypeAttributesDefaultDescription
localAddressstring

The local IP or hostname to expose

localPortnumber

The local port to expose

remoteAddressstring

The remote tunnel address

remotePortnumber

The remote tunnel port

maxConnectionsnumber<optional>
24

Total connections to maintain

loggerobject<optional>
console

Logger to use

transformstream.Transform<optional>

Transform stream for manipulating incoming proxied stream

Members

url

Gets the appropriate tunnel URL

Methods

close()

Shutsdown the tunnel

open()

Establishes the tunnel connection

queryProxyInfoFromServer() → {Promise.<object>}

Requests and returns server assigned info for this tunnel

Returns:
Type: 
Promise.<object>

reconnect()

Kick off the auto reconnect heartbeat