mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-17 16:10:52 +00:00
* feat: add uPnP nat manager Adds a really basic nat manager that attempts to use UPnP to punch a hole through your router for any IPV4 tcp addresses you have configured. Adds any configured addresses to the node's observed addresses list and adds observed addresses to `libp2p.multiaddrs` so we exchange them with peers when performing `identify` and people can dial you. Adds configuration options under `config.nat` Hole punching is async to not affect start up time. Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
25 lines
404 B
JavaScript
25 lines
404 B
JavaScript
'use strict'
|
|
|
|
const Transport = require('libp2p-tcp')
|
|
const Muxer = require('libp2p-mplex')
|
|
const { NOISE: Crypto } = require('libp2p-noise')
|
|
|
|
module.exports = {
|
|
modules: {
|
|
transport: [Transport],
|
|
streamMuxer: [Muxer],
|
|
connEncryption: [Crypto]
|
|
},
|
|
config: {
|
|
relay: {
|
|
enabled: true,
|
|
hop: {
|
|
enabled: false
|
|
}
|
|
},
|
|
nat: {
|
|
enabled: false
|
|
}
|
|
}
|
|
}
|