This repository was archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
changing the default stun server #455
Copy link
Copy link
Open
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritization
Description
I used the configs when I create my libp2p node and added my custom turn server to it like this:
transport: {
WebRTCStar: {
filter: filters.all,
listenerOptions: {
config: {
iceServers: [
{
urls: 'turn:*******',
username: '*****',
credential: '******',
credentialType: 'password',
},
],
},
},
},
},but after a long time of debugging, I found out that this customization is only happening for the listener part.
on the other hand, when a user tries to dial another one, there will be a new instance of simple peer with the default configuration.
I managed to resolve it by adding the configs to dial options but this shouldn't be the case right?
private dial = async (addr: Multiaddr, protocol: Protocols) => {
return this.node.dialProtocol(addr, protocol, {
spOptions: {
config: {
iceServers: [
{
urls: 'turn:*******',
username: '*****',
credential: '******',
credentialType: 'password',
},
],
},
},
} as any);
};Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upneed/triageNeeds initial labeling and prioritizationNeeds initial labeling and prioritization
Type
Projects
Status
🪵Backlog