ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to authenticate HTTP FLV streaming?

PMExtra opened this issue · comments

Does HTTP FLV streaming require authentication?

TRANS_BY_GPT3

Not supported right now. It's in the plan of SRS3.

Is it reasonable to use http_hooks_on_connect?

TRANS_BY_GPT3

SRS2 will support HTTP callback for FLV.

SRS2:

[2018-08-11 19:07:51][trace] post to sessions, req={"action":"on_play","client_id":113,"ip":"127.0.0.1","vhost":"defaultVhost","app":"live","stream":"livestream","param":"","pageUrl":""}
[2018-08-11 19:07:51][trace] srs on_play: client id=113, ip=127.0.0.1, vhost=defaultVhost, app=live, stream=livestream, param=, pageUrl=
127.0.0.1 - - [11/Aug/2018:19:07:51] "POST /api/v1/sessions HTTP/1.1" 200 25 "" "SRS(Simple RTMP Server)2.0.253"
[2018-08-11 19:07:52][trace] post to sessions, req={"action":"on_stop","client_id":113,"ip":"127.0.0.1","vhost":"defaultVhost","app":"live","stream":"livestream","param":""}
[2018-08-11 19:07:52][trace] srs on_stop: client id=113, ip=127.0.0.1, vhost=defaultVhost, app=live, stream=livestream, param=
127.0.0.1 - - [11/Aug/2018:19:07:52] "POST /api/v1/sessions HTTP/1.1" 200 25 "" "SRS(Simple RTMP Server)2.0.253"

SRS3:

[2018-08-11 19:23:11][trace] post to sessions, req={"action":"on_play","client_id":109,"ip":"::ffff:127.0.0.1","vhost":"defaultVhost","app":"live","stream":"livestream","param":"","pageUrl":""}
[2018-08-11 19:23:11][trace] srs on_play: client id=109, ip=::ffff:127.0.0.1, vhost=defaultVhost, app=live, stream=livestream, param=, pageUrl=
127.0.0.1 - - [11/Aug/2018:19:23:11] "POST /api/v1/sessions HTTP/1.1" 200 25 "" "SRS/3.0.39(OuXuli)"
[2018-08-11 19:23:16][trace] post to sessions, req={"action":"on_stop","client_id":109,"ip":"::ffff:127.0.0.1","vhost":"defaultVhost","app":"live","stream":"livestream","param":""}
[2018-08-11 19:23:16][trace] srs on_stop: client id=109, ip=::ffff:127.0.0.1, vhost=defaultVhost, app=live, stream=livestream, param=
127.0.0.1 - - [11/Aug/2018:19:23:16] "POST /api/v1/sessions HTTP/1.1" 200 25 "" "SRS/3.0.39(OuXuli)"

SRS2 and SRS3 have both supported FLV authentication, please refer to http hooks.

  • SRS2: HTTP Callback: the parameter of on_play at CN or EN.
  • SRS3: HTTP Callback: the parameter of on_play at CN or EN.

TRANS_BY_GPT3