Skip to content

Restrict usage of TURN only to authenticated users #82

@max-baz

Description

@max-baz

Hello,

Thanks for the interesting project!

Thinking of a self-hosted scenario, I can see that it's possible to configure TURN server, but I would like to restrict its usage only to authenticated set of users. Say I selfhost it on webwormhole.example.com and someone finds out my server - I don't care too much if they use it with STUN (where the traffic is still going peer-to-peer), but I would like to prevent them from relaying a ton of traffic over my tiny server.

I think screego solved this issue beautifully, and I would suggest to implement something similar:

  • Create a simple user-password mapping file on server side (see SCREEGO_USERS_FILE environment variable)
  • In UI, there is a simple login form that can authenticate you against this file
  • When you want to send a file (or start screenshare, in case of screego), if you are not authenticated, the app will only use STUN, but if you are, it will also use TURN - receivers don't have to be authenticated

If even this is too much, I imagine instead of users mapping we could have a single "relay password", so if you provide it when starting a transfer, TURN will be allowed too, otherwise only STUN. I'd prefer having multiple passwords (in case I need to give someone else a temporary one), but it's not a big deal either way.

What do you think of this idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions