From 10b4e5c8cd4e4fada313618ec4e5eaf339c06f9b Mon Sep 17 00:00:00 2001 From: Michael Feher Date: Thu, 20 Jun 2024 12:35:32 -0400 Subject: [PATCH] chore(dapp-ui): add nodely turn server --- sites/dapp-ui/.env | 4 +++- sites/dapp-ui/src/components/ConnectModal.tsx | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/sites/dapp-ui/.env b/sites/dapp-ui/.env index e5457ce..648c22b 100644 --- a/sites/dapp-ui/.env +++ b/sites/dapp-ui/.env @@ -1,2 +1,4 @@ VITE_TURN_USERNAME="fc7708976bf5d60be20c5a1d" -VITE_TURN_CREDENTIAL="sVpEREQGGhXOw4gX" \ No newline at end of file +VITE_TURN_CREDENTIAL="sVpEREQGGhXOw4gX" +VITE_NODELY_TURN_USERNAME="liquid-auth" +VITE_NODELY_TURN_CREDENTIAL="sqmcP4MiTKMT4TGEDSk9jgHY" diff --git a/sites/dapp-ui/src/components/ConnectModal.tsx b/sites/dapp-ui/src/components/ConnectModal.tsx index 5a7ef74..3469367 100644 --- a/sites/dapp-ui/src/components/ConnectModal.tsx +++ b/sites/dapp-ui/src/components/ConnectModal.tsx @@ -59,6 +59,18 @@ export function ConnectModal({ 'stun:stun2.l.google.com:19302', ], }, + { + urls: [ + "turn:global.turn.nodely.network:80?transport=tcp", + "turns:global.turn.nodely.network:443?transport=tcp", + "turn:eu.turn.nodely.io:80?transport=tcp", + "turns:eu.turn.nodely.io:443?transport=tcp", + "turn:us.turn.nodely.io:80?transport=tcp", + "turns:us.turn.nodely.io:443?transport=tcp", + ], + username: import.meta.env.VITE_NODELY_TURN_USERNAME || 'username', + credential: import.meta.env.VITE_NODELY_TURN_CREDENTIAL || 'credential', + }, { urls: [ 'turn:global.relay.metered.ca:80', @@ -71,6 +83,7 @@ export function ConnectModal({ username: import.meta.env.VITE_TURN_USERNAME || 'username', credential: import.meta.env.VITE_TURN_CREDENTIAL || 'credential', }, + ], iceCandidatePoolSize: 10, }) @@ -141,7 +154,7 @@ export function ConnectModal({ height: '80px', width: '80px', }} - > + >