Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

changing the default stun server #455

Open
amirtgm opened this issue Jul 6, 2022 · 4 comments
Open

changing the default stun server #455

amirtgm opened this issue Jul 6, 2022 · 4 comments
Labels
need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up

Comments

@amirtgm
Copy link

amirtgm commented Jul 6, 2022

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);
  };
@mpetrunic mpetrunic added the need/triage Needs initial labeling and prioritization label Aug 30, 2022
@BigLep BigLep added the P2 Medium: Good to have, but can wait until someone steps up label Sep 6, 2022
@tinytb tinytb moved this to Backlog in js-libp2p Oct 11, 2022
@tinytb tinytb added this to js-libp2p Oct 11, 2022
@BaptisteHubert
Copy link

Hello,
I am commenting this issue as i think i have the same problem (even though the fix proposed by @amirtgm doesn't work in my case).

Even when i'm providing a TURN server in the WebRTC, i am not able to find a peer that isn't on the same network as mine.

I am following the second code block cited on the js-libp2p/doc/CONFIGURATION.MD

Here is my libp2p configuration
My code is running online at this address

Version of libp2p: 0.37.3
Version of webrtc-star: 3.0.3

@BaptisteHubert
Copy link

Hi @BigLep, since you previously triaged this issue, could you expand on the way it could be pushed forward?
Being in the "maintenance priorities", does that mean that you already pinned down the problem at the core of this issue?

@BigLep
Copy link

BigLep commented Nov 18, 2022

Hi @BaptisteHubert: Unfortunately I don't expect this issue to get any engagement from the core maintainers in light of the work that is happening with building a robust WebRTC implementation across libp2p implementations: libp2p/specs#412

@p-shahi : I thought we had a work item for clarifying the maintenance posture for webrtc-star and webrtc-direct. If not would you please be able to create one and execute on it?

@p-shahi
Copy link
Member

p-shahi commented Nov 22, 2022

Yes please see the incoming archival notice in the readme: #486
I'll archive this repo shortly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need/triage Needs initial labeling and prioritization P2 Medium: Good to have, but can wait until someone steps up
Projects
Archived in project
Development

No branches or pull requests

5 participants