jvb: use modern config for ice4j

This commit is contained in:
Saúl Ibarra Corretgé
2021-10-12 21:11:00 +02:00
parent 18ac85b69e
commit 76a16a8b78
3 changed files with 14 additions and 9 deletions

View File

@@ -68,10 +68,21 @@ ice4j {
harvest {
mapping {
stun {
{{ if .Env.JVB_STUN_SERVERS }}
{{ if .Env.JVB_STUN_SERVERS -}}
addresses = [ "{{ join "\",\"" (splitList "," .Env.JVB_STUN_SERVERS) }}" ]
{{ end }}
{{ else -}}
enabled = false
{{ end -}}
}
static-mappings = [
{{ if .Env.DOCKER_HOST_ADDRESS -}}
{
local-address = "{{ .Env.LOCAL_ADDRESS }}"
public-address = "{{ .Env.DOCKER_HOST_ADDRESS }}"
}
{{ end -}}
]
}
}
}

View File

@@ -1,5 +0,0 @@
{{ if .Env.DOCKER_HOST_ADDRESS }}
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS={{ .Env.LOCAL_ADDRESS }}
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS={{ .Env.DOCKER_HOST_ADDRESS }}
{{ end }}