mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-28 15:57:09 +08:00
Merge pull request #3515 from nextcloud/enh/3461/do-not-expose-udp
This commit is contained in:
commit
1daacdfa99
1 changed files with 11 additions and 2 deletions
|
@ -425,12 +425,17 @@ class DockerActionManager
|
|||
if ($container->GetInternalPort() !== 'host') {
|
||||
foreach($container->GetPorts()->GetPorts() as $value) {
|
||||
$port = $value->port;
|
||||
$protocol = $value->protocol;
|
||||
if ($port === '%APACHE_PORT%') {
|
||||
$port = $this->configurationManager->GetApachePort();
|
||||
// Do not expose udp if AIO is in reverse proxy mode
|
||||
if ($port !== '443' && $protocol === 'udp') {
|
||||
continue;
|
||||
}
|
||||
} else if ($port === '%TALK_PORT%') {
|
||||
$port = $this->configurationManager->GetTalkPort();
|
||||
}
|
||||
$portWithProtocol = $port . '/' . $value->protocol;
|
||||
$portWithProtocol = $port . '/' . $protocol;
|
||||
$exposedPorts[$portWithProtocol] = null;
|
||||
}
|
||||
$requestBody['HostConfig']['NetworkMode'] = 'nextcloud-aio';
|
||||
|
@ -442,8 +447,13 @@ class DockerActionManager
|
|||
$requestBody['ExposedPorts'] = $exposedPorts;
|
||||
foreach ($container->GetPorts()->GetPorts() as $value) {
|
||||
$port = $value->port;
|
||||
$protocol = $value->protocol;
|
||||
if ($port === '%APACHE_PORT%') {
|
||||
$port = $this->configurationManager->GetApachePort();
|
||||
// Do not expose udp if AIO is in reverse proxy mode
|
||||
if ($port !== '443' && $protocol === 'udp') {
|
||||
continue;
|
||||
}
|
||||
} else if ($port === '%TALK_PORT%') {
|
||||
$port = $this->configurationManager->GetTalkPort();
|
||||
}
|
||||
|
@ -451,7 +461,6 @@ class DockerActionManager
|
|||
if ($ipBinding === '%APACHE_IP_BINDING%') {
|
||||
$ipBinding = $this->configurationManager->GetApacheIPBinding();
|
||||
}
|
||||
$protocol = $value->protocol;
|
||||
$portWithProtocol = $port . '/' . $protocol;
|
||||
$requestBody['HostConfig']['PortBindings'][$portWithProtocol] = [
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue