fix: improve IPv6 compatibility in containers and PHP AIO interface

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/c71fba87-d463-4682-9cb3-abb659b2ca40

Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-28 19:10:13 +00:00
committed by GitHub
parent 50643afd6a
commit 3abbbfbc2b
6 changed files with 60 additions and 9 deletions

View File

@@ -75,6 +75,13 @@ if grep -q "1" /sys/module/ipv6/parameters/disable \
|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
IP_BINDING="0.0.0.0"
fi
# Build a listen address suitable for the signaling server's "ip:port" format.
# IPv6 needs bracket notation: [::]:8081; IPv4 keeps the plain form: 0.0.0.0:8081
if [ "$IP_BINDING" = "::" ]; then
SIGNALING_LISTEN="[::]:8081"
else
SIGNALING_LISTEN="$IP_BINDING:8081"
fi
if [ "$AIO_LOG_LEVEL" != 'debug' ]; then
set +x
fi
@@ -118,7 +125,7 @@ fi
# Signaling
cat << SIGNALING_CONF > "/conf/signaling.conf"
[http]
listen = 0.0.0.0:8081
listen = ${SIGNALING_LISTEN}
readtimeout = 15
writetimeout = 30