diff --git a/client/core/controllers/selfhosted/installController.cpp b/client/core/controllers/selfhosted/installController.cpp index 7eb3458de..8f04b0e8c 100644 --- a/client/core/controllers/selfhosted/installController.cpp +++ b/client/core/controllers/selfhosted/installController.cpp @@ -152,8 +152,8 @@ ErrorCode InstallController::setupContainer(const ServerCredentials &credentials return startupContainerWorker(credentials, container, config, sshSession); } -ErrorCode InstallController::updateContainer(const QString &serverId, DockerContainer container, const ContainerConfig &oldConfig, - ContainerConfig &newConfig) +ErrorCode InstallController::updateServerConfig(const QString &serverId, DockerContainer container, const ContainerConfig &oldConfig, + ContainerConfig &newConfig) { if (!isUpdateDockerContainerRequired(container, oldConfig, newConfig)) { auto adminConfig = m_serversRepository->selfHostedAdminConfig(serverId); @@ -185,7 +185,7 @@ ErrorCode InstallController::updateContainer(const QString &serverId, DockerCont SshSession sshSession(this); bool reinstallRequired = isReinstallContainerRequired(container, oldConfig, newConfig); - qDebug() << "InstallController::updateContainer for container" << container << "reinstall required is" << reinstallRequired; + qDebug() << "InstallController::updateServerConfig for container" << container << "reinstall required is" << reinstallRequired; bool xrayServerSettingsChanged = false; if (container == DockerContainer::Xray || container == DockerContainer::SSXray) { @@ -213,11 +213,11 @@ ErrorCode InstallController::updateContainer(const QString &serverId, DockerCont if (errorCode == ErrorCode::NoError && xrayServerSettingsChanged && !skipXrayInboundSync) { DnsSettings dnsSettings = { m_appSettingsRepository->primaryDns(), m_appSettingsRepository->secondaryDns() }; XrayConfigurator xrayConfigurator(&sshSession); - qDebug() << "InstallController::updateContainer applying Xray server inbound sync, reinstall=" + qDebug() << "InstallController::updateServerConfig applying Xray server inbound sync, reinstall=" << reinstallRequired; errorCode = xrayConfigurator.applyServerSettingsToRemote(credentials, container, newConfig, dnsSettings, false); if (errorCode != ErrorCode::NoError) { - qDebug() << "InstallController::updateContainer Xray inbound sync failed, error=" + qDebug() << "InstallController::updateServerConfig Xray inbound sync failed, error=" << static_cast(errorCode); } } @@ -236,6 +236,41 @@ ErrorCode InstallController::updateContainer(const QString &serverId, DockerCont return errorCode; } +ErrorCode InstallController::updateClientConfig(const QString &serverId, DockerContainer container, ContainerConfig &newConfig) +{ + switch (m_serversRepository->serverKind(serverId)) { + case serverConfigUtils::ConfigType::SelfHostedAdmin: { + auto config = m_serversRepository->selfHostedAdminConfig(serverId); + if (!config.has_value()) { + return ErrorCode::InternalError; + } + config->updateContainerConfig(container, newConfig); + m_serversRepository->editServer(serverId, config->toJson(), serverConfigUtils::ConfigType::SelfHostedAdmin); + return ErrorCode::NoError; + } + case serverConfigUtils::ConfigType::SelfHostedUser: { + auto config = m_serversRepository->selfHostedUserConfig(serverId); + if (!config.has_value()) { + return ErrorCode::InternalError; + } + config->updateContainerConfig(container, newConfig); + m_serversRepository->editServer(serverId, config->toJson(), serverConfigUtils::ConfigType::SelfHostedUser); + return ErrorCode::NoError; + } + case serverConfigUtils::ConfigType::Native: { + auto config = m_serversRepository->nativeConfig(serverId); + if (!config.has_value()) { + return ErrorCode::InternalError; + } + config->updateContainerConfig(container, newConfig); + m_serversRepository->editServer(serverId, config->toJson(), serverConfigUtils::ConfigType::Native); + return ErrorCode::NoError; + } + default: + return ErrorCode::InternalError; + } +} + void InstallController::clearCachedProfile(const QString &serverId, DockerContainer container) { if (ContainerUtils::containerService(container) == ServiceType::Other) { diff --git a/client/core/controllers/selfhosted/installController.h b/client/core/controllers/selfhosted/installController.h index 6aec8ce86..d68db6e37 100644 --- a/client/core/controllers/selfhosted/installController.h +++ b/client/core/controllers/selfhosted/installController.h @@ -34,7 +34,12 @@ public: ~InstallController(); ErrorCode setupContainer(const ServerCredentials &credentials, DockerContainer container, ContainerConfig &config, bool isUpdate = false); - ErrorCode updateContainer(const QString &serverId, DockerContainer container, const ContainerConfig &oldConfig, ContainerConfig &newConfig); + + // Updates server-side container settings (admin self-hosted only): reconfigures the container over SSH. + ErrorCode updateServerConfig(const QString &serverId, DockerContainer container, const ContainerConfig &oldConfig, ContainerConfig &newConfig); + + // Updates client-local settings only: rewrites the stored container config for any self-hosted/native server. No SSH. + ErrorCode updateClientConfig(const QString &serverId, DockerContainer container, ContainerConfig &newConfig); ErrorCode rebootServer(const QString &serverId); ErrorCode removeAllContainers(const QString &serverId); diff --git a/client/core/models/selfhosted/nativeServerConfig.cpp b/client/core/models/selfhosted/nativeServerConfig.cpp index f70d00f2a..833392356 100644 --- a/client/core/models/selfhosted/nativeServerConfig.cpp +++ b/client/core/models/selfhosted/nativeServerConfig.cpp @@ -29,6 +29,11 @@ ContainerConfig NativeServerConfig::containerConfig(DockerContainer container) c return containers.value(container); } +void NativeServerConfig::updateContainerConfig(DockerContainer container, const ContainerConfig &config) +{ + containers[container] = config; +} + QPair NativeServerConfig::getDnsPair(const QString &primaryDns, const QString &secondaryDns) const { QString d1 = dns1; diff --git a/client/core/models/selfhosted/nativeServerConfig.h b/client/core/models/selfhosted/nativeServerConfig.h index 46fb60f5e..9136dbb74 100644 --- a/client/core/models/selfhosted/nativeServerConfig.h +++ b/client/core/models/selfhosted/nativeServerConfig.h @@ -27,6 +27,8 @@ struct NativeServerConfig { bool hasContainers() const; ContainerConfig containerConfig(DockerContainer container) const; + void updateContainerConfig(DockerContainer container, const ContainerConfig &config); + QPair getDnsPair(const QString &primaryDns, const QString &secondaryDns) const; QJsonObject toJson() const; diff --git a/client/core/models/selfhosted/selfHostedUserServerConfig.cpp b/client/core/models/selfhosted/selfHostedUserServerConfig.cpp index e7d0a1724..205018c22 100644 --- a/client/core/models/selfhosted/selfHostedUserServerConfig.cpp +++ b/client/core/models/selfhosted/selfHostedUserServerConfig.cpp @@ -43,6 +43,11 @@ ContainerConfig SelfHostedUserServerConfig::containerConfig(DockerContainer cont return containers.value(container); } +void SelfHostedUserServerConfig::updateContainerConfig(DockerContainer container, const ContainerConfig &config) +{ + containers[container] = config; +} + QPair SelfHostedUserServerConfig::getDnsPair(const QString &primaryDns, const QString &secondaryDns) const { diff --git a/client/core/models/selfhosted/selfHostedUserServerConfig.h b/client/core/models/selfhosted/selfHostedUserServerConfig.h index 5c54819dc..1a355b6af 100644 --- a/client/core/models/selfhosted/selfHostedUserServerConfig.h +++ b/client/core/models/selfhosted/selfHostedUserServerConfig.h @@ -32,6 +32,8 @@ struct SelfHostedUserServerConfig { bool hasContainers() const; ContainerConfig containerConfig(DockerContainer container) const; + void updateContainerConfig(DockerContainer container, const ContainerConfig &config); + QPair getDnsPair(const QString &primaryDns, const QString &secondaryDns) const; QJsonObject toJson() const; diff --git a/client/ui/controllers/selfhosted/installUiController.cpp b/client/ui/controllers/selfhosted/installUiController.cpp index ebe94c18b..3b8b8513f 100644 --- a/client/ui/controllers/selfhosted/installUiController.cpp +++ b/client/ui/controllers/selfhosted/installUiController.cpp @@ -211,15 +211,13 @@ void InstallUiController::scanServerForInstalledContainers(const QString &server emit installationErrorOccurred(errorCode); } -void InstallUiController::updateContainer(const QString &serverId, int containerIndex, int protocolIndex, bool closePage) +bool InstallUiController::buildContainerConfigFromModel(int containerIndex, int protocolIndex, ContainerConfig &containerConfig) { DockerContainer container = static_cast(containerIndex); - Proto protocolType = static_cast(protocolIndex); - - ContainerConfig containerConfig; + containerConfig.container = container; - + switch (protocolType) { case Proto::Awg: { containerConfig.protocolConfig = m_awgConfigModel->getProtocolConfig(); @@ -265,6 +263,41 @@ void InstallUiController::updateContainer(const QString &serverId, int container } #endif default: + return false; + } + return true; +} + +void InstallUiController::updateClientConfig(const QString &serverId, int containerIndex, int protocolIndex, bool closePage) +{ + DockerContainer container = static_cast(containerIndex); + Proto protocolType = static_cast(protocolIndex); + + ContainerConfig containerConfig; + if (!buildContainerConfigFromModel(containerIndex, protocolIndex, containerConfig)) { + return; + } + + ErrorCode errorCode = m_installController->updateClientConfig(serverId, container, containerConfig); + + if (errorCode == ErrorCode::NoError) { + ContainerConfig updatedConfig = m_serversController->getContainerConfig(serverId, container); + m_protocolModel->updateModel(updatedConfig); + updateProtocolConfigModel(serverId, static_cast(container), static_cast(protocolType)); + emit updateContainerFinished(tr("Settings updated successfully"), closePage); + return; + } + + emit installationErrorOccurred(errorCode); +} + +void InstallUiController::updateServerConfig(const QString &serverId, int containerIndex, int protocolIndex, bool closePage) +{ + DockerContainer container = static_cast(containerIndex); + Proto protocolType = static_cast(protocolIndex); + + ContainerConfig containerConfig; + if (!buildContainerConfigFromModel(containerIndex, protocolIndex, containerConfig)) { return; } ContainerConfig oldContainerConfig = m_serversController->getContainerConfig(serverId, container); @@ -299,13 +332,13 @@ void InstallUiController::updateContainer(const QString &serverId, int container QFuture future = QtConcurrent::run([installController, serverId, container, oldConfigCopy, newConfigCopy]() mutable -> ErrorCode { - return installController->updateContainer(serverId, container, oldConfigCopy, newConfigCopy); + return installController->updateServerConfig(serverId, container, oldConfigCopy, newConfigCopy); }); watcher->setFuture(future); return; } - ErrorCode errorCode = m_installController->updateContainer(serverId, container, oldContainerConfig, containerConfig); + ErrorCode errorCode = m_installController->updateServerConfig(serverId, container, oldContainerConfig, containerConfig); if (errorCode == ErrorCode::NoError) { ContainerConfig updatedConfig = m_serversController->getContainerConfig(serverId, container); diff --git a/client/ui/controllers/selfhosted/installUiController.h b/client/ui/controllers/selfhosted/installUiController.h index 695c0e685..25c1fed4d 100644 --- a/client/ui/controllers/selfhosted/installUiController.h +++ b/client/ui/controllers/selfhosted/installUiController.h @@ -64,7 +64,8 @@ public slots: void scanServerForInstalledContainers(const QString &serverId); - void updateContainer(const QString &serverId, int containerIndex, int protocolIndex, bool closePage = true); + void updateServerConfig(const QString &serverId, int containerIndex, int protocolIndex, bool closePage = true); + void updateClientConfig(const QString &serverId, int containerIndex, int protocolIndex, bool closePage = true); void removeServer(const QString &serverId); void rebootServer(const QString &serverId); @@ -161,6 +162,8 @@ private: QString m_privateKeyPassphrase; void updateProtocolConfigModel(const QString &serverId, int containerIndex, int protocolIndex); + + bool buildContainerConfigFromModel(int containerIndex, int protocolIndex, ContainerConfig &containerConfig); }; #endif // INSTALLUICONTROLLER_H diff --git a/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml b/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml index f5a484848..33ebd6d55 100644 --- a/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolAwgClientSettings.qml @@ -440,8 +440,7 @@ PageType { return } - PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Awg) + InstallController.updateClientConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Awg) } var noButtonFunction = function() {} diff --git a/client/ui/qml/Pages2/PageProtocolAwgSettings.qml b/client/ui/qml/Pages2/PageProtocolAwgSettings.qml index 9053d71ea..12155c236 100644 --- a/client/ui/qml/Pages2/PageProtocolAwgSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolAwgSettings.qml @@ -561,7 +561,7 @@ PageType { } PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Awg) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Awg) } var noButtonFunction = function() {} diff --git a/client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml b/client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml index d375b6633..ee0cb906c 100644 --- a/client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml @@ -434,7 +434,7 @@ PageType { } PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.OpenVpn) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.OpenVpn) } var noButtonFunction = function() { if (!GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolWireGuardClientSettings.qml b/client/ui/qml/Pages2/PageProtocolWireGuardClientSettings.qml index 4fc326bde..4fbbdc5bd 100644 --- a/client/ui/qml/Pages2/PageProtocolWireGuardClientSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolWireGuardClientSettings.qml @@ -128,8 +128,7 @@ PageType { return } - PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.WireGuard) + InstallController.updateClientConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.WireGuard) } var noButtonFunction = function() {} showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) diff --git a/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml b/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml index 682cb27b1..5bba03900 100644 --- a/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolWireGuardSettings.qml @@ -129,7 +129,7 @@ PageType { } PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.WireGuard) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.WireGuard) } var noButtonFunction = function() { if (!GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXrayFlowSettings.qml b/client/ui/qml/Pages2/PageProtocolXrayFlowSettings.qml index 1b59573d8..0d724a6c1 100644 --- a/client/ui/qml/Pages2/PageProtocolXrayFlowSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXrayFlowSettings.qml @@ -112,7 +112,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXraySecuritySettings.qml b/client/ui/qml/Pages2/PageProtocolXraySecuritySettings.qml index 33f1d2640..fbe161a14 100644 --- a/client/ui/qml/Pages2/PageProtocolXraySecuritySettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXraySecuritySettings.qml @@ -279,7 +279,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXraySettings.qml b/client/ui/qml/Pages2/PageProtocolXraySettings.qml index 071a0a072..66c68e658 100644 --- a/client/ui/qml/Pages2/PageProtocolXraySettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXraySettings.qml @@ -213,7 +213,7 @@ PageType { } PageController.goToPage(PageEnum.PageSetupWizardInstalling); - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function() { if (!GC.isMobile()) saveButton.forceActiveFocus() diff --git a/client/ui/qml/Pages2/PageProtocolXrayTransportSettings.qml b/client/ui/qml/Pages2/PageProtocolXrayTransportSettings.qml index 2903d00df..8a531c54a 100644 --- a/client/ui/qml/Pages2/PageProtocolXrayTransportSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXrayTransportSettings.qml @@ -742,7 +742,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXrayXPaddingBytesSettings.qml b/client/ui/qml/Pages2/PageProtocolXrayXPaddingBytesSettings.qml index 32db6c114..11f022927 100644 --- a/client/ui/qml/Pages2/PageProtocolXrayXPaddingBytesSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXrayXPaddingBytesSettings.qml @@ -95,7 +95,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXrayXPaddingSettings.qml b/client/ui/qml/Pages2/PageProtocolXrayXPaddingSettings.qml index 46ba1ca59..721d673c5 100644 --- a/client/ui/qml/Pages2/PageProtocolXrayXPaddingSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXrayXPaddingSettings.qml @@ -211,7 +211,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageProtocolXrayXmuxSettings.qml b/client/ui/qml/Pages2/PageProtocolXrayXmuxSettings.qml index 3e1f54d0e..ddd73990e 100644 --- a/client/ui/qml/Pages2/PageProtocolXrayXmuxSettings.qml +++ b/client/ui/qml/Pages2/PageProtocolXrayXmuxSettings.qml @@ -208,7 +208,7 @@ PageType { return } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Xray) } var noButtonFunction = function () { if (typeof GC !== "undefined" && !GC.isMobile()) { diff --git a/client/ui/qml/Pages2/PageServiceMtProxySettings.qml b/client/ui/qml/Pages2/PageServiceMtProxySettings.qml index 57284fcca..03b6c0272 100644 --- a/client/ui/qml/Pages2/PageServiceMtProxySettings.qml +++ b/client/ui/qml/Pages2/PageServiceMtProxySettings.qml @@ -179,7 +179,7 @@ PageType { function mtProxyScheduleUpdate(closePage) { var cp = closePage === undefined ? false : closePage Qt.callLater(function () { - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.MtProxy, cp) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.MtProxy, cp) }) } diff --git a/client/ui/qml/Pages2/PageServiceSocksProxySettings.qml b/client/ui/qml/Pages2/PageServiceSocksProxySettings.qml index bf1f3f56e..12bf8bb9e 100644 --- a/client/ui/qml/Pages2/PageServiceSocksProxySettings.qml +++ b/client/ui/qml/Pages2/PageServiceSocksProxySettings.qml @@ -285,7 +285,7 @@ PageType { } PageController.goToPage(PageEnum.PageSetupWizardInstalling) - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Socks5Proxy) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Socks5Proxy) tempPort = portTextField.textField.text tempUsername = usernameTextField.textField.text tempPassword = passwordTextField.textField.text diff --git a/client/ui/qml/Pages2/PageServiceTelemtSettings.qml b/client/ui/qml/Pages2/PageServiceTelemtSettings.qml index d97fd70d0..2cec630d5 100644 --- a/client/ui/qml/Pages2/PageServiceTelemtSettings.qml +++ b/client/ui/qml/Pages2/PageServiceTelemtSettings.qml @@ -154,7 +154,7 @@ PageType { function telemtScheduleUpdate(closePage) { var cp = closePage === undefined ? false : closePage Qt.callLater(function () { - InstallController.updateContainer(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Telemt, cp) + InstallController.updateServerConfig(ServersUiController.processedServerId, ServersUiController.processedContainerIndex, ProtocolEnum.Telemt, cp) }) }