feat(jvb): add ports to advertised ips (#2050)

* feat(jvb): add ports to advertised ips

* feat(jvb): add support for advertised ports with ipv6 and ipv4

* feat: split ip and port with # delimiter

* docs: add advertising port to env.example
This commit is contained in:
Fabian
2025-09-23 06:22:52 +02:00
committed by GitHub
parent 34044cda25
commit 7bb7a56339
2 changed files with 13 additions and 2 deletions

View File

@@ -150,11 +150,22 @@ ice4j {
}
static-mappings = [
{{ range $index, $element := $JVB_IPS -}}
{{ if contains "#" $element -}}
{{ $element_ip_port := splitn "#" 2 $element -}}
{
local-address = "{{ $ENV.LOCAL_ADDRESS }}"
public-address = "{{ $element_ip_port._0 }}"
local-port = {{ $ENV.JVB_PORT | default 10000 }}
public-port = {{ $element_ip_port._1 }}
name = "ip-{{ $index }}"
},
{{ else -}}
{
local-address = "{{ $ENV.LOCAL_ADDRESS }}"
public-address = "{{ $element }}"
name = "ip-{{ $index }}"
},
{{ end -}}
{{ end -}}
]
}