thiagoeolima / nginx-rtmps

Docker image with Nginx using the nginx-rtmp-module module for streaming and Stunnel to add TLS encryption functionality.
32 stars 21 forks source link

Must the stunnel be used for nginx-rtmps? #2

Open hongyi-zhao opened 3 years ago

hongyi-zhao commented 3 years ago

I've noticed the following contents from the git master version of nginx-rtmp-module:

$ egrep -inR 'ssl' .
./ngx_rtmp_handshake.c:11:#include <openssl/hmac.h>
./ngx_rtmp_handshake.c:12:#include <openssl/sha.h>
./ngx_rtmp_handshake.c:111:#if OPENSSL_VERSION_NUMBER < 0x10100000L
./hls/ngx_rtmp_mpegts.h:13:#include <openssl/aes.h>
./config:132:USE_OPENSSL=YES
Binary file ./.git/objects/pack/pack-d7c34c8c57305af7f92dce3514b22136f4100ddc.pack matches
./README.md:68:Several versions of nginx (1.3.14 - 1.5.0) require http_ssl_module to be
./README.md:71:    ./configure --add-module=/path/to/nginx-rtmp-module --with-http_ssl_module
./test/www/jwplayer/jwplayer.js:9:b.isYouTube=function(a){return-1<a.indexOf("youtube.com")||-1<a.indexOf("youtu.be")};b.isRtmp=function(a,b){return 0==a.indexOf("rtmp")||"rtmp"==b};b.foreach=function(a,b){for(var e in a)a.hasOwnProperty(e)&&b(e)};b.isHTTPS=function(){return 0==g.location.href.indexOf("https")};b.repo=function(){var a="http://p.jwpcdn.com/"+d.version.split(/\W/).splice(0,2).join("/")+"/";try{b.isHTTPS()&&(a=a.replace("http://","https://ssl."))}catch(e){}return a}}(jwplayer),function(d){var a="video/",h={mp4:a+"mp4",

But I'm not sure whether the above messages can assure us of the native support for TLS without the help of Stunnel. Any hints will be highly appreciated.

Regards, HY

successtheman commented 1 year ago

For this container/repo stunnel is required for RTMPS. It is possible to use a modified nginx-rtmp-module with RTMPS support such as this one https://github.com/mannyamorim/nginx-rtmp-module but it hasn't been updated for some time, and it's just easier to use stunnel and not have to worry about it being updated. I am not sure how the container would react using the modified module anyway

I managed to get this container working with the new kick.com streaming service and I'll make a PR in the next few days adding how to get that working