feat(prosody) - Added TURN_USERNAME and TURN_PASSWORD (#1989)
Co-authored-by: lala <lala@mediot.com.tw>
This commit is contained in:
@@ -304,6 +304,8 @@ services:
|
|||||||
- STUN_HOST
|
- STUN_HOST
|
||||||
- STUN_PORT
|
- STUN_PORT
|
||||||
- TURN_CREDENTIALS
|
- TURN_CREDENTIALS
|
||||||
|
- TURN_USERNAME
|
||||||
|
- TURN_PASSWORD
|
||||||
- TURN_HOST
|
- TURN_HOST
|
||||||
- TURNS_HOST
|
- TURNS_HOST
|
||||||
- TURN_PORT
|
- TURN_PORT
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ log = {
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ if $PROSODY_ENABLE_METRICS }}
|
{{ if $PROSODY_ENABLE_METRICS }}
|
||||||
-- Statistics Provider configuration
|
-- Statistics Provider configuration
|
||||||
statistics = "internal"
|
statistics = "internal"
|
||||||
statistics_interval = "manual"
|
statistics_interval = "manual"
|
||||||
@@ -351,7 +351,26 @@ external_services = {
|
|||||||
{{- range $idx1, $host := $TURN_HOSTS -}}
|
{{- range $idx1, $host := $TURN_HOSTS -}}
|
||||||
{{- range $idx2, $transport := $TURN_TRANSPORTS -}}
|
{{- range $idx2, $transport := $TURN_TRANSPORTS -}}
|
||||||
{{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }}
|
{{- if or $STUN_HOST $idx1 $idx2 -}},{{- end }}
|
||||||
{ type = "turn", host = "{{ $host }}", port = {{ $TURN_PORT }}, transport = "{{ $transport }}", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
|
{
|
||||||
|
type = "turn",
|
||||||
|
host = "{{ $host }}",
|
||||||
|
port = {{ $TURN_PORT }},
|
||||||
|
transport = "{{ $transport }}",
|
||||||
|
ttl = {{ $TURN_TTL }},
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_CREDENTIALS -}}
|
||||||
|
secret = true,
|
||||||
|
algorithm = "turn",
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_USERNAME -}}
|
||||||
|
username = "{{$.Env.TURN_USERNAME}}",
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_PASSWORD -}}
|
||||||
|
password = "{{$.Env.TURN_PASSWORD}}",
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -359,7 +378,26 @@ external_services = {
|
|||||||
{{- if $TURNS_HOST -}}
|
{{- if $TURNS_HOST -}}
|
||||||
{{- range $idx, $host := $TURNS_HOSTS -}}
|
{{- range $idx, $host := $TURNS_HOSTS -}}
|
||||||
{{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }}
|
{{- if or $STUN_HOST $TURN_HOST $idx -}},{{- end }}
|
||||||
{ type = "turns", host = "{{ $host }}", port = {{ $TURNS_PORT }}, transport = "tcp", secret = true, ttl = {{ $TURN_TTL }}, algorithm = "turn" }
|
{
|
||||||
|
type = "turns",
|
||||||
|
host = "{{ $host }}",
|
||||||
|
port = {{ $TURNS_PORT }},
|
||||||
|
transport = "tcp",
|
||||||
|
ttl = {{ $TURN_TTL }},
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_CREDENTIALS -}}
|
||||||
|
secret = true,
|
||||||
|
algorithm = "turn",
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_USERNAME -}}
|
||||||
|
username = "{{$.Env.TURN_USERNAME}}",
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{ if $.Env.TURN_PASSWORD -}}
|
||||||
|
password = "{{$.Env.TURN_PASSWORD}}",
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user