1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Live: Support connect origin by HTTP-FLV/HTTPS-FLV

This commit is contained in:
winlin 2021-02-19 18:16:05 +08:00
parent 76c0c3ff80
commit 181c9f25ed
6 changed files with 250 additions and 4 deletions

View file

@ -3829,7 +3829,7 @@ srs_error_t SrsConfig::check_normal_config()
for (int j = 0; j < (int)conf->directives.size(); j++) {
string m = conf->at(j)->name;
if (m != "mode" && m != "origin" && m != "token_traverse" && m != "vhost" && m != "debug_srs_upnode" && m != "coworkers"
&& m != "origin_cluster") {
&& m != "origin_cluster" && m != "protocol") {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal vhost.cluster.%s of %s", m.c_str(), vhost->arg0().c_str());
}
}
@ -6042,6 +6042,28 @@ SrsConfDirective* SrsConfig::get_vhost_edge_origin(string vhost)
return conf->get("origin");
}
string SrsConfig::get_vhost_edge_protocol(string vhost)
{
static string DEFAULT = "rtmp";
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
return DEFAULT;
}
conf = conf->get("cluster");
if (!conf) {
return DEFAULT;
}
conf = conf->get("protocol");
if (!conf) {
return DEFAULT;
}
return conf->arg0();
}
bool SrsConfig::get_vhost_edge_token_traverse(string vhost)
{
static bool DEFAULT = false;