miroslavpejic85 / mirotalk

🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 4k and 60fps, compatible with all browsers and platforms.
https://p2p.mirotalk.com
GNU Affero General Public License v3.0
2.59k stars 502 forks source link

/test tests wrong ICE servers #197

Closed plague-doctor closed 5 months ago

plague-doctor commented 5 months ago

Describe the bug

Calling https://talk.mydomain.tld/test shows:

[
    {
        "urls": "stun:stun.l.google.com:19302"
    },
    {
        "urls": "turn:a.relay.metered.ca:443",
        "username": "e8dd65b92c62d3e36cafb807",
        "credential": "uWdWNmkhvyqTEswO"
    }
]

even if my own ICE has been defined:

2023-12-01 22:12:27.358] [server] settings {
  iceServers: [
    { urls: 'stun:coturn.mydomain.tld:5349' },
    {
      urls: 'turn:coturn.mydomain.tld:5349',
      username: 'user',
      credential: 'password'
    }
  ],

Expected behaviour

Test the ICE servers configured with my instance of mirotalk.

dmitryos commented 5 months ago

One can use a query string parameters to provide testing swrvers. If we test already configured servers in the system then probably we don't want to expose them on the result page if someone opens this pageb

plague-doctor commented 5 months ago

Agreed. Those creds/servers should be obfuscated, but still, I would like to check my own configuration.

dmitryos commented 5 months ago

https://docs.mirotalk.com/coturn/installation/

Bottom section has the way to test your swrvers if it helps...

plague-doctor commented 5 months ago

Of course there is. It is not a problem that one cannot find the information or the way to verify it by different means. The problem is, that is it very confusing when one tries to verify connection to the ICE servers and suddenly sees completely different configuration... I just opened .../test and it shows something I have not configured. It took me a while to figure out it was just a fake data.

miroslavpejic85 commented 5 months ago

Hello @plague-doctor,

For illustrative purposes, the Turn demo server credentials have been directly embedded in the test page, featuring a predefined monthly limit of 50GB. However, as @dmitryos wisely points out, it is strongly discouraged to expose your personal Turn username and password through the MiroTalk P2P URL of your instance at:

https://your-domain-name/test

To test your Turn server without exposing your credentials, you can use the Query URL as specified in the documentation:

https://docs.mirotalk.com/coturn/installation/#test


# Default listening port

https://your-domain-name/test?iceServers=[{"urls":"stun:coturn.mydomain.tld:3478"},{"urls":"turn:coturn.mydomain.tld:3478","username":"your.username","credential":"your.password"}]

# TLS listening port

https://your-domain-name/test?iceServers=[{"urls":"stun:coturn.mydomain.tld:5349"},{"urls":"turn:coturn.mydomain.tld:5349","username":"your.username","credential":"your.password"}]


For instance, you can use the following test URL (replace with your own credentials):

https://p2p.mirotalk.com/test?iceServers=[{"urls":"stun:stun.l.google.com:19302"},{"urls":"turn:a.relay.metered.ca:443","username":"your.username","credential":"your-password"}]

Replace p2p.mirotalk.com with your-domain-name

For any future questions or discussions, let's hop over to the official forum instead. It's a great space for all of us to chat before diving into things here. Just to clarify, this isn't a bug, but more of a small misunderstanding about using the test page. Thanks a bunch for your understanding! 🙌

Wishing you all a fantastic weekend ahead!

Cheers, Miroslav