Skip to content

Commit 0eb0ebd

Browse files
authored
Merge pull request #8 from algorandfoundation/chore/nodely-turn-servers
chore: add Nodely STUN/TURN services
2 parents 59f26c5 + 55504d2 commit 0eb0ebd

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

hooks/useConnection.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,24 @@ export function useConnection(origin: string, requestId: string): UseConnectionR
439439
//@ts-ignore
440440
client.authenticated = true;
441441

442-
const datachannel = await client.peer(requestId, "answer");
442+
const datachannel = await client.peer(requestId, "answer", {
443+
iceServers: [
444+
{
445+
urls: [
446+
"stun:geo.turn.algonode.xyz:80",
447+
"stun:global.turn.nodely.io:443"
448+
]
449+
},
450+
{
451+
urls: [
452+
"turn:geo.turn.algonode.xyz:80?transport=tcp",
453+
"turns:global.turn.nodely.io:443?transport=tcp"
454+
],
455+
"username": "liquid-auth",
456+
"credential": "sqmcP4MiTKMT4TGEDSk9jgHY"
457+
},
458+
],
459+
});
443460

444461
if (!active) {
445462
client.close();

0 commit comments

Comments
 (0)