srs
srs copied to clipboard
Edge: fix origin fail for missing or incomplete params.
1. Background
When setting up edge nodes for origin retrieval mode, sometimes the origin server requires authentication parameters for validation. If a playback request reaches the edge and triggers origin retrieval without these parameters, it can result in playback failure.
2. Configuration
Configuration file:
listen 1935;
max_connections 1000;
pid objs/edge.pid;
daemon off;
srs_log_tank console;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
cluster {
mode remote;
origin 127.0.0.1:19350;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
}
3. Playback Request
Format 1
ffplay -v debug "rtmp://127.0.0.1/live?secret=84af974ae64b2e1d&time=3C5DA3FA7/livestream"
Format 2
ffplay -v debug "rtmp://127.0.0.1/live?secret=84af974ae64b2e1d/livestream?time=3C5DA3FA7"
Format 3
ffplay -v debug "rtmp://127.0.0.1/live/livestream?secret=84af974ae64b2e1d&time=3C5DA3FA7"
TRANS_BY_GPT4
Add some unit tests.
TRANS_BY_GPT4
As we are going to support new edge cluster, the Relay mode, so I'd like to close this PR for edge.