mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #211, support security allow/deny publish/play all/ip. 2.0.86
This commit is contained in:
parent
f8ec7c706d
commit
75f2607685
14 changed files with 348 additions and 4 deletions
29
trunk/conf/full.conf
Executable file → Normal file
29
trunk/conf/full.conf
Executable file → Normal file
|
@ -142,6 +142,35 @@ http_stream {
|
|||
vhost __defaultVhost__ {
|
||||
}
|
||||
|
||||
# the security to allow or deny clients.
|
||||
vhost security.srs.com {
|
||||
# security for host to allow or deny clients.
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/issues/211
|
||||
security {
|
||||
# whether enable the security for vhost.
|
||||
# default: off
|
||||
enabled on;
|
||||
# the security list, each item format as:
|
||||
# allow|deny publish|play all|<ip>
|
||||
# for example:
|
||||
# allow publish all;
|
||||
# deny publish all;
|
||||
# allow publish 127.0.0.1;
|
||||
# deny publish 127.0.0.1;
|
||||
# allow play all;
|
||||
# deny play all;
|
||||
# allow play 127.0.0.1;
|
||||
# deny play 127.0.0.1;
|
||||
# SRS apply the following simple strategies one by one:
|
||||
# 1. allow all if security disabled.
|
||||
# 2. default to deny all when security enabled.
|
||||
# 3. allow if matches allow strategy.
|
||||
# 4. deny if matches deny strategy.
|
||||
allow play all;
|
||||
allow publish all;
|
||||
}
|
||||
}
|
||||
|
||||
# the MR(merged-read) setting for publisher.
|
||||
# the MW(merged-write) settings for player.
|
||||
vhost mrw.srs.com {
|
||||
|
|
0
trunk/conf/realtime.conf
Executable file → Normal file
0
trunk/conf/realtime.conf
Executable file → Normal file
13
trunk/conf/security.deny.publish.conf
Normal file
13
trunk/conf/security.deny.publish.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
# security config for srs, allow play and deny publish.
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/issues/211#issuecomment-68507035
|
||||
# @see full.conf for detail config.
|
||||
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
vhost __defaultVhost__ {
|
||||
security {
|
||||
enabled on;
|
||||
deny publish all;
|
||||
allow play all;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue