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

refactor: deduplicate resolveHostname into DataConst

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/42427bd4-05e6-4197-bdb7-db3761815113

refactor: move resolveHostname from DataConst into new NetworkHelper class

Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/73cb1d89-ab85-43b6-adfe-a90c00ad60a1
This commit is contained in:
copilot-swe-agent[bot]
2026-04-28 19:10:13 +00:00
committed by Simon L.
parent 9cfaad674c
commit 0722cf95be
8 changed files with 52 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ namespace AIO\Data;
use AIO\Auth\PasswordGenerator;
use AIO\Controller\DockerController;
use AIO\Helper\NetworkHelper;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\TransferException;
@@ -1111,9 +1112,9 @@ class ConfigurationManager
'INSTALL_LATEST_MAJOR' => $this->installLatestMajor ? 'yes' : '',
'REMOVE_DISABLED_APPS' => $this->nextcloudKeepDisabledApps ? '' : 'yes',
// Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then)
'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'),
'AIO_DATABASE_HOST' => NetworkHelper::resolveHostname('nextcloud-aio-database'),
// Allow to get local ip-address of caddy container and add it to trusted proxies automatically
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? gethostbyname('nextcloud-aio-caddy') : '',
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? NetworkHelper::resolveHostname('nextcloud-aio-caddy') : '',
'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '',
'AIO_VERSION' => $this->getAioVersion(),
default => $this->getRegisteredSecret($placeholder),