libp2p
    Preparing search index...

    Module @libp2p/autonat-v2

    The AutoNATv2 service implements the AutoNAT v2 protocol to confirm whether addresses the node is listening on are dialable by remote peers.

    It does not implement NAT hole punching.

    import { createLibp2p } from 'libp2p'
    import { autoNATv2 } from '@libp2p/autonat-v2'

    const node = await createLibp2p({
    // ...other options
    services: {
    autoNAT: autoNATv2()
    }
    })

    // observe per-address reachability changes as they are probed
    node.services.autoNAT.addEventListener('address:reachable', (evt) => {
    console.info(evt.detail.addr, 'is externally dialable')
    })
    AddressReachabilityChange
    AutoNATv2
    AutoNATv2Components
    AutoNATv2Events
    AutoNATv2ServiceInit
    autoNATv2