SRS支持HTTP有几个应用:
- HTTP-API:侦听在1985,提供API服务。
问题:没有支持鉴权,需要鉴权后代理到HTTP-API,也可以支持回调鉴权 API: Secure HTTP API for Authentication. 1985端口没有任何安全认证 #1640
问题:没有支持HTTPS,需要Nginx支持HTTPS后代理到SRS,SRS如果支持后会比较方便 SSL or HTTPS in port 8080 for HLS #1533 - HTTP-FLV:侦听在8080,提供FLV流服务。
问题:没有支持HTTPS,需要Nginx支持HTTPS后代理到SRS,SRS如果支持后会比较方便 SSL or HTTPS in port 8080 for HLS #1533 - HLS:侦听在8080,或共享切片给Nginx,提供HLS流服务。
问题:没有统计HLS客户端数目,和RTMP/FLV不一致,SRS如果支持会比较方便 客户端统计接口调用中,未统计hls客户端 #1655
问题:没有对HLS做鉴权,和RTMP/FLV不一致,SRS如果支持会比较方便 SRS3.0 是否支持对HTTP-HLS请求鉴权。 #1487
问题:没有支持HTTPS,需要Nginx支持HTTPS后代理到SRS,SRS如果支持后会比较方便 SSL or HTTPS in port 8080 for HLS #1533 - 使用Nginx或Caddy代理,提供统一的HTTP/HTTPS服务,参考 HTTP/HTTPS: Reuse or merge port for API and Stream to avoid HTTP Proxy,复用端口避免代理 #2881
SRS4或SRS5若增强HTTP流媒体服务的能力,使用起来会更方便,一致性也比较强。
6条答案
按热度按时间bmvo0sr51#
There is a work-around:
Use nginx or go-oryx/httpx-static to covert HTTP to HTTPS, or HTTPS直播实战,搞定HTTPS-HLS和HTTPS-FLV 。
Whatever, SRS will support HTTPS client and server inside.
deikduxw2#
HTTPS Client protocol:
HTTP callback support HTTPS server, for example, conf/https.hooks.callback.conf :
The log of SRS, for https-client:
Note: The wireshark capture file for HTTPS client: https-client.pcapng.zip
Note: Refer to OpenSSL example using memory BIO with non-blocking socket IO .
bzzcjhmw3#
HTTPS API server protocol:
Config for HTTPS API, for example, conf/https.rtc.conf :
Open in Chrome:
The SRS logs:
Note: Capture files https-server-port-1443.pcapng.zip , https-server.pcapng.zip
Note: Refer to OpenSSL example using memory BIO with non-blocking socket IO .
ht4b089n4#
值得好好做,打好HTTP基础。
ssgvzors5#
HTTP-API相关的Issue,都汇总到这个issue更新:
carvr3hs6#
期待SRS4能支持HLS的clients统计和HLS的on_play/on_stop回调