Module: kadence/traverse


(require("kadence/traverse"))(strategies)

Registers a module:kadence/traverse~TraversePlugin with an AbstractNode. Strategies are attempted in the order they are defined.
Parameters:
Name Type Description
strategies Array.<module:kadence/traverse~TraverseStrategy>
Source:
Example

Proper Configuration

const node = new kadence.KademliaNode(node_options);
const keys = node.plugin(kadence.spartacus(key_options));

node.plugin(kadence.traverse([
  new kadence.traverse.UPNPStrategy({
    publicPort: 8080,
    mappingTtl: 0
  }),
  new kadence.traverse.NATPMPStrategy({
    publicPort: 8080,
    mappingTtl: 0
  }),
  new kadence.traverse.ReverseTunnelStrategy({
    remoteAddress: 'my.diglet.server',
    remotePort: 8443,
    privateKey: keys.privateKey,
    secureLocalConnection: false,
    verboseLogging: false
  })
]));

node.listen(node.contact.port);

Classes

NATPMPStrategy
ReverseTunnelStrategy
TraversePlugin
TraverseStrategy
UPNPStrategy