defaultNodeConfig
defaultNodeConfig(
bootstrapConfig,webrtcIceServers?,options?):PeerborneConfig
Defined in: packages/core/src/peerborne-node.ts:94
Default config for Node.js environments.
Note on mDNS (LAN broadcast): This default includes mDNS peer discovery,
which advertises and discovers peers on the local LAN via UDP multicast.
This allows same-network nodes to find each other without relay servers or
bootstrap peers. Because this actively broadcasts the node’s presence on the
local network, privacy-sensitive deployments should disable it by building a
custom config (copy this one and omit mdns() from peerDiscovery) rather
than using defaultNodeConfig directly.
The default blockstore and datastore are process-local and ephemeral. Node
applications that require persistence should replace config.helia’s
stores before starting Peerborne. The datastore persists the libp2p key for
one running instance at a time.
The default listen addresses bind no local socket, so the node accepts
connections only through a Circuit Relay reservation. To accept direct
connections, append an address a configured transport can bind, such as
/ip4/127.0.0.1/tcp/0/ws, to config.helia.libp2p.addresses.listen.
The connection gater refuses loopback, private, link-local, cloud metadata
and other non-public addresses (see isLocalNetworkAddress), so a remote
peer cannot make this node connect to local services. LAN deployments and
local relays need DefaultConfigOptions.allowLocalNetworkDials.
Parameters
Section titled “Parameters”bootstrapConfig
Section titled “bootstrapConfig”BootstrapInit
Bootstrap peer list to seed peer discovery.
webrtcIceServers?
Section titled “webrtcIceServers?”readonly Readonly<IceServer>[]
Optional override for the WebRTC ICE server list.
When undefined, the package-level DEFAULT_WEBRTC_ICE_SERVERS list is
used (see ./peerborne-config) so peers can discover their public
address mappings via STUN without relying on relay infrastructure for
data plane forwarding (issue #236 phase 3).
options?
Section titled “options?”DefaultConfigOptions = {}
Dial policy options.