MonaSolutions / MonaServer2

Temporary project planned to replace MonaServer
GNU General Public License v3.0
278 stars 36 forks source link

RTMP Authentification #62

Open OaShadow opened 2 years ago

OaShadow commented 2 years ago

Hello there!

Iam trying to use MonaServer for publishing a RTMP stream to a bunch of PC's. The link should not be accessible from people without having authentificate thereselfs to be allowed to see the Stream.

What I want to achive is, to have a auth link where you need to enter the username and password to view the stream. Example: rtmp://username:password@123.0.0.123:1935/live/stream

Is this already implemented or planned to be? Or is there a module you can load into MonaServer to archieve this?

thomasjammet commented 2 years ago

Hi!

That's a good question, you cannot use this URL format with RTMP but you can add the parameters inside the query, something like this : rtmp://123.0.0.123:1935/live/stream?user=username&pass=password

And on the server side you could implement your own authentication control here : https://github.com/MonaSolutions/MonaServer2/blob/master/MonaTiny/sources/MonaTiny.cpp#L173

Tell us if you need help for this.