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

refine the config structure, compatible with SRS1/2

This commit is contained in:
winlin 2015-08-29 18:40:18 +08:00
parent a79e19599c
commit 7ef3ff90c0
6 changed files with 424 additions and 225 deletions

View file

@ -0,0 +1,35 @@
listen 1935;
pid ./objs/srs.pid;
srs_log_tank console;
srs_log_level trace;
max_connections 1000;
daemon off;
http_api {
enabled on;
listen 1985;
crossdomain on;
raw_api {
enabled on;
allow_reload on;
allow_query on;
}
}
# for SRS1.
http_stream {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
# for SRS2.
refer github.com github.io;
refer_publish github.com github.io;
refer_play github.com github.io;
# for SRS1.
http {
enabled on;
mount [vhost]/hls;
dir ./objs/nginx/html/hls;
}
}

View file

@ -229,6 +229,81 @@ stream_caster {
# for which cannot identify the required vhost.
vhost __defaultVhost__ {
}
# the vhost for antisuck.
vhost refer.anti_suck.com {
# refer hotlink-denial.
refer {
# whether enable the refer hotlink-denial.
# default: off.
enabled on;
# the common refer for play and publish.
# if the page url of client not in the refer, access denied.
# if not specified this field, allow all.
# default: not specified.
all github.com github.io;
# refer for publish clients specified.
# the common refer is not overrided by this.
# if not specified this field, allow all.
# default: not specified.
publish github.com github.io;
# refer for play clients specified.
# the common refer is not overrided by this.
# if not specified this field, allow all.
# default: not specified.
play github.com github.io;
}
}
# vhost for bandwidth check
# generally, the bandcheck vhost must be: bandcheck.srs.com,
# or need to modify the vhost of client.
vhost bandcheck.srs.com {
enabled on;
chunk_size 65000;
# bandwidth check config.
bandcheck {
# whether support bandwidth check,
# default: off.
enabled on;
# the key for server to valid,
# if invalid key, server disconnect and abort the bandwidth check.
key "35c9b402c12a7246868752e2878f7e0e";
# the interval in seconds for bandwidth check,
# server donot allow new test request.
# default: 30
interval 30;
# the max available check bandwidth in kbps.
# to avoid attack of bandwidth check.
# default: 1000
limit_kbps 4000;
}
}
# the security to allow or deny clients.
vhost security.srs.com {
@ -952,25 +1027,6 @@ vhost stream.control.com {
publish_normal_timeout 7000;
}
# the vhost for antisuck.
vhost refer.anti_suck.com {
# the common refer for play and publish.
# if the page url of client not in the refer, access denied.
# if not specified this field, allow all.
# default: not specified.
refer github.com github.io;
# refer for publish clients specified.
# the common refer is not overrided by this.
# if not specified this field, allow all.
# default: not specified.
refer_publish github.com github.io;
# refer for play clients specified.
# the common refer is not overrided by this.
# if not specified this field, allow all.
# default: not specified.
refer_play github.com github.io;
}
# the vhost which forward publish streams.
vhost same.vhost.forward.srs.com {
# forward all publish stream to the specified server.
@ -1003,31 +1059,6 @@ vhost exec.srs.com {
}
}
# vhost for bandwidth check
# generally, the bandcheck vhost must be: bandcheck.srs.com,
# or need to modify the vhost of client.
vhost bandcheck.srs.com {
enabled on;
chunk_size 65000;
# bandwidth check config.
bandcheck {
# whether support bandwidth check,
# default: off.
enabled on;
# the key for server to valid,
# if invalid key, server disconnect and abort the bandwidth check.
key "35c9b402c12a7246868752e2878f7e0e";
# the interval in seconds for bandwidth check,
# server donot allow new test request.
# default: 30
interval 30;
# the max available check bandwidth in kbps.
# to avoid attack of bandwidth check.
# default: 1000
limit_kbps 4000;
}
}
# set the chunk size of vhost.
vhost chunksize.srs.com {
# the default chunk size is 128, max is 65536,

View file

@ -43,26 +43,6 @@ stream_caster {
rtp_port_min 57200;
rtp_port_max 57300;
}
stream_caster {
enabled off;
caster mpegts_over_udp;
output rtmp://127.0.0.1/live/livestream;
listen 8935;
}
stream_caster {
enabled off;
caster rtsp;
output rtmp://127.0.0.1/[app]/[stream];
listen 554;
rtp_port_min 57200;
rtp_port_max 57300;
}
stream_caster {
enabled off;
caster flv;
output rtmp://127.0.0.1/[app]/[stream];
listen 8936;
}
vhost __defaultVhost__ {
}
vhost vhost.srs.com {
@ -98,9 +78,12 @@ vhost vhost.srs.com {
publish_1stpkt_timeout 20000;
publish_normal_timeout 7000;
refer github.com github.io;
refer_publish github.com github.io;
refer_play github.com github.io;
refer {
enabled off;
all github.com github.io;
publish github.com github.io;
play github.com github.io;
}
bandcheck {
enabled off;