Skip to content

Commit

Permalink
chore: remove stun servers
Browse files Browse the repository at this point in the history
as of libp2p/js-libp2p#2606 these are now
preconfigured
  • Loading branch information
2color committed Jul 12, 2024
1 parent c430f64 commit d693e22
Showing 1 changed file with 5 additions and 53 deletions.
58 changes: 5 additions & 53 deletions content/guides/getting-started/webrtc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down Expand Up @@ -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,
+ }),
Expand Down Expand Up @@ -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,
}),
Expand Down Expand Up @@ -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,
}),
Expand Down Expand Up @@ -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,
}),
Expand Down

0 comments on commit d693e22

Please sign in to comment.