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:
@@ -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 -}}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user