rename readIps and PublishIps into readIPs and publishIPs

This commit is contained in:
aler9 2021-07-31 17:44:40 +02:00
parent abc4a47c1c
commit 00dd622180
5 changed files with 11 additions and 11 deletions

View File

@ -84,11 +84,11 @@ type PathConf struct {
// authentication
PublishUser string `yaml:"publishUser"`
PublishPass string `yaml:"publishPass"`
PublishIPs []string `yaml:"publishIps"`
PublishIPs []string `yaml:"publishIPs"`
PublishIPsParsed []interface{} `yaml:"-" json:"-"`
ReadUser string `yaml:"readUser"`
ReadPass string `yaml:"readPass"`
ReadIPs []string `yaml:"readIps"`
ReadIPs []string `yaml:"readIPs"`
ReadIPsParsed []interface{} `yaml:"-" json:"-"`
// custom commands
@ -266,7 +266,7 @@ func (pconf *PathConf) fillAndCheck(name string) error {
}
if pconf.Source != "record" {
return nil, fmt.Errorf("'publishIps' is useless when source is not 'record', since the stream is not provided by a publisher, but by a fixed source")
return nil, fmt.Errorf("'publishIPs' is useless when source is not 'record', since the stream is not provided by a publisher, but by a fixed source")
}
return parseIPCidrList(pconf.PublishIPs)

View File

@ -42,7 +42,7 @@ func TestHLSServerReadAuth(t *testing.T) {
" all:\n" +
" readUser: testuser\n" +
" readPass: testpass\n" +
" readIps: [127.0.0.0/16]\n")
" readIPs: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
defer p.close()

View File

@ -81,7 +81,7 @@ func TestRTMPServerAuth(t *testing.T) {
" all:\n" +
" publishUser: testuser\n" +
" publishPass: testpass\n" +
" readIps: [127.0.0.0/16]\n")
" readIPs: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
defer p.close()
@ -116,7 +116,7 @@ func TestRTMPServerAuth(t *testing.T) {
" all:\n" +
" readUser: testuser\n" +
" readPass: testpass\n" +
" readIps: [127.0.0.0/16]\n")
" readIPs: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
defer p.close()

View File

@ -205,7 +205,7 @@ func TestRTSPServerAuth(t *testing.T) {
" all:\n" +
" publishUser: testuser\n" +
" publishPass: test!$()*+.;<=>[]^_-{}\n" +
" publishIps: [127.0.0.0/16]\n")
" publishIPs: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
defer p.close()
@ -246,7 +246,7 @@ func TestRTSPServerAuth(t *testing.T) {
" all:\n" +
" readUser: testuser\n" +
" readPass: test!$()*+.;<=>[]^_-{}\n" +
" readIps: [127.0.0.0/16]\n")
" readIPs: [127.0.0.0/16]\n")
require.Equal(t, true, ok)
defer p.close()
@ -408,7 +408,7 @@ func TestRTSPServerAuthFail(t *testing.T) {
"hlsDisable: yes\n" +
"paths:\n" +
" all:\n" +
" publishIps: [128.0.0.1/32]\n")
" publishIPs: [128.0.0.1/32]\n")
require.Equal(t, true, ok)
defer p.close()

View File

@ -173,7 +173,7 @@ paths:
# sha256-hashed values can be inserted with the "sha256:" prefix.
publishPass:
# ips or networks (x.x.x.x/24) allowed to publish.
publishIps: []
publishIPs: []
# username required to read.
# sha256-hashed values can be inserted with the "sha256:" prefix.
@ -182,7 +182,7 @@ paths:
# sha256-hashed values can be inserted with the "sha256:" prefix.
readPass:
# ips or networks (x.x.x.x/24) allowed to read.
readIps: []
readIPs: []
# command to run when this path is initialized.
# this can be used to publish a stream and keep it always opened.