You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to implement authentication by placing the srs3.0 token parameter after the streamID? #1110
The 'token' parameter of srs3.0 is placed after the StreamID. In the TcURL of http_hook, this token is not present. It is only present in the TcUrl when placed after 'live'.
How can I retrieve the token in the 'json_req' of server.py for authentication?
Push stream rtmp://test.lsspush.test.com/live/steam001?key=123000000000&t=20000.
on_connect
json_req:
{u'ip': u'192.168.0.101, u'app': u'live', u'vhost': u'defaultVhost', u'pageUrl': u'', u'client_id': 108, u'tcUrl': u'rtmp://test.lsspush.test.com/live', u'action': u'on_connect'}
Just add a field to the code of 'hook', I modified the source code myself. Winlin has completed 99% of it, so you just need to make the remaining changes yourself. Alternatively, you can create an issue and ask him to fix it.
In addition, the JSON data structure received by the proxy here is also somewhat different from the description in the http-hooks of full.conf. Do we need to adjust it ourselves in the source code to match the desired data structure?
changed the title [-]srs3.0 token参数放在streamID后面如何实现认证[/-][+]How to implement authentication by placing the srs3.0 token parameter after the streamID?[/+]on Jul 28, 2023
Activity
wnpllrzodiac commentedon Apr 10, 2018
2.0 branch have support this feature. You can look up changelog.
Ccrazyfish commentedon Apr 12, 2018
2.0branch tried it, got the streamID, but there are no parameters with key=** in the hook information.
Push stream address:
rtmp://172.16.162.16/live/stream000?key=123435
Hook information:
action: {u'ip': u'172.16.162.190', u'app': u'live', u'vhost': u'defaultVhost', u'pageUrl': u'',
u'client_id': 120, u'tcUrl': u'rtmp://172.16.162.16', u'action': u'on_connect'}
{u'stream': u'stream000', u'ip': u'172.16.162.190', u'app': u'live', u'vhost': u'defaultVhost',
u'client_id': 120, u'tcUrl': u'rtmp://172.16.162.16', u'action': u'on_publish'}
TRANS_BY_GPT3wnpllrzodiac commentedon Apr 12, 2018
Just add a field to the code of 'hook', I modified the source code myself. Winlin has completed 99% of it, so you just need to make the remaining changes yourself. Alternatively, you can create an issue and ask him to fix it.
TRANS_BY_GPT3winlinvip commentedon Aug 4, 2018
SRS2:
Support params in
on_publish,on_unpublish,on_play,on_stop,on_dvr,on_hlsandon_hls_notify.For #1110, Support params in http callback. 2.0.251
winlinvip commentedon Aug 4, 2018
SRS3:
Support params in
on_publish,on_unpublish,on_play,on_stop,on_dvr,on_hlsandon_hls_notify.For #1110, Support params in http callback. 2.0.251
For #1110, Support params in http callback. 3.0.36
For #1110, Refine conf
For #1110, Refine code.
For #1110, Refine params in http callback. 2.0.253
For #1110, Refine params in http callback. 2.0.253
itmanlee commentedon Jul 7, 2022
Hello, I would like to ask you two questions. Please refer to the screenshot.
TRANS_BY_GPT3itmanlee commentedon Jul 7, 2022
In addition, the JSON data structure received by the proxy here is also somewhat different from the description in the http-hooks of full.conf. Do we need to adjust it ourselves in the source code to match the desired data structure?
TRANS_BY_GPT3itmanlee commentedon Jul 7, 2022
[-]srs3.0 token参数放在streamID后面如何实现认证[/-][+]How to implement authentication by placing the srs3.0 token parameter after the streamID?[/+]