From d693e227b988563f9e550452057e69ab88b80b7d Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:30:48 +0200 Subject: [PATCH] chore: remove stun servers as of https://github.com/libp2p/js-libp2p/pull/2606 these are now preconfigured --- content/guides/getting-started/webrtc.md | 58 ++---------------------- 1 file changed, 5 insertions(+), 53 deletions(-) diff --git a/content/guides/getting-started/webrtc.md b/content/guides/getting-started/webrtc.md index a1bb272d..dc8ad245 100644 --- a/content/guides/getting-started/webrtc.md +++ b/content/guides/getting-started/webrtc.md @@ -158,19 +158,7 @@ const libp2p = await createLibp2p({ // Allow all WebSocket connections inclusing without TLS webSockets({ filter: filters.all }), webTransport(), - webRTC({ - rtcConfiguration: { - iceServers: [ - { - // STUN servers help the browser discover its own public IPs - urls: [ - "stun:stun.l.google.com:19302", - "stun:global.stun.twilio.com:3478", - ], - }, - ], - }, - }), + webRTC(), ], connectionEncryption: [noise()], streamMuxers: [yamux()], @@ -234,16 +222,7 @@ const libp2p = await createLibp2p({ // Allow all WebSocket connections inclusing without TLS webSockets({ filter: filters.all }), webTransport(), - webRTC({ - rtcConfiguration: { - iceServers: [ - { - // STUN servers help the browser discover its own public IPs - urls: ['stun:stun.l.google.com:19302', 'stun:global.stun.twilio.com:3478'], - }, - ], - }, - }), + webRTC(), + circuitRelayTransport({ + discoverRelays: 1, + }), @@ -300,16 +279,7 @@ const libp2p = await createLibp2p({ // Allow all WebSocket connections inclusing without TLS webSockets({ filter: filters.all }), webTransport(), - webRTC({ - rtcConfiguration: { - iceServers: [ - { - // STUN servers help the browser discover its own public IPs - urls: ['stun:stun.l.google.com:19302', 'stun:global.stun.twilio.com:3478'], - }, - ], - }, - }), + webRTC(), circuitRelayTransport({ discoverRelays: 1, }), @@ -352,16 +322,7 @@ const libp2p = await createLibp2p({ // Allow all WebSocket connections inclusing without TLS webSockets({ filter: filters.all }), webTransport(), - webRTC({ - rtcConfiguration: { - iceServers: [ - { - // STUN servers help the browser discover its own public IPs - urls: ['stun:stun.l.google.com:19302', 'stun:global.stun.twilio.com:3478'], - }, - ], - }, - }), + webRTC(), circuitRelayTransport({ discoverRelays: 1, }), @@ -440,16 +401,7 @@ const libp2p = await createLibp2p({ // Allow all WebSocket connections inclusing without TLS webSockets({ filter: filters.all }), webTransport(), - webRTC({ - rtcConfiguration: { - iceServers: [ - { - // STUN servers help the browser discover its own public IPs - urls: ['stun:stun.l.google.com:19302', 'stun:global.stun.twilio.com:3478'], - }, - ], - }, - }), + webRTC(), circuitRelayTransport({ discoverRelays: 1, }),