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

@@ -31,11 +31,11 @@ TZ=UTC
# Keep in mind that if you use a non-standard HTTPS port, it has to appear in the public URL # Keep in mind that if you use a non-standard HTTPS port, it has to appear in the public URL
#PUBLIC_URL=https://meet.example.com:${HTTPS_PORT} #PUBLIC_URL=https://meet.example.com:${HTTPS_PORT}
# Media IP addresses to advertise by the JVB # Media IP addresses and ports to advertise by the JVB
# This setting deprecates DOCKER_HOST_ADDRESS, and supports a comma separated list of IPs # This setting deprecates DOCKER_HOST_ADDRESS, and supports a comma separated list of IPs
# See the "Running behind NAT or on a LAN environment" section in the Handbook: # See the "Running behind NAT or on a LAN environment" section in the Handbook:
# https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#running-behind-nat-or-on-a-lan-environment # https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#running-behind-nat-or-on-a-lan-environment
#JVB_ADVERTISE_IPS=192.168.1.1,1.2.3.4 #JVB_ADVERTISE_IPS=192.168.1.1,1.2.3.4,192.168.178.1#12000,fe80::1#12000
# #
# Memory limits for Java components # Memory limits for Java components

View File

@@ -150,11 +150,22 @@ ice4j {
} }
static-mappings = [ static-mappings = [
{{ range $index, $element := $JVB_IPS -}} {{ 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 }}" local-address = "{{ $ENV.LOCAL_ADDRESS }}"
public-address = "{{ $element }}" public-address = "{{ $element }}"
name = "ip-{{ $index }}" name = "ip-{{ $index }}"
}, },
{{ end -}}
{{ end -}} {{ end -}}
] ]
} }