Skip to content

Commit

Permalink
Merge pull request #379 from libp2p/remove-stun-defaults
Browse files Browse the repository at this point in the history
chore: remove stun servers in webrtc guide
  • Loading branch information
2color authored Jul 12, 2024
2 parents c430f64 + d693e22 commit c39a671
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 c39a671

Please sign in to comment.