Skip to content

Commit deb9165

Browse files
authored
feat: add WebRTC-Direct listener (#741)
Replaces the WebRTC listener with a WebRTC-Direct listener under Node.js so the Helia instance can accept incoming dials without also needing a relay reservation.
1 parent fc2b6d4 commit deb9165

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/helia/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@libp2p/tcp": "^10.0.18",
7979
"@libp2p/tls": "^2.0.15",
8080
"@libp2p/upnp-nat": "^3.1.1",
81-
"@libp2p/webrtc": "^5.0.26",
81+
"@libp2p/webrtc": "^5.1.0",
8282
"@libp2p/websockets": "^9.1.5",
8383
"@multiformats/dns": "^1.0.6",
8484
"blockstore-core": "^5.0.2",

packages/helia/src/utils/libp2p-defaults.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ export function libp2pDefaults (options: Libp2pDefaultsOptions = {}): Libp2pOpti
5353
listen: [
5454
'/ip4/0.0.0.0/tcp/0',
5555
'/ip4/0.0.0.0/tcp/0/ws',
56+
'/ip4/0.0.0.0/udp/0/webrtc-direct',
5657
'/ip6/::/tcp/0',
5758
'/ip6/::/tcp/0/ws',
58-
'/p2p-circuit',
59-
'/webrtc'
59+
'/ip6/::/udp/0/webrtc-direct',
60+
'/p2p-circuit'
6061
]
6162
},
6263
transports: [

0 commit comments

Comments
 (0)