remove comment & reset file

This commit is contained in:
dranik
2026-06-13 22:35:51 +03:00
parent 7064e8465b
commit cef419b666
4 changed files with 1 additions and 12 deletions
@@ -234,10 +234,6 @@ ErrorCode InstallController::updateServerConfig(const QString &serverId, DockerC
} else if (container == DockerContainer::Telemt) { } else if (container == DockerContainer::Telemt) {
TelemtInstaller::uploadClientSettingsSnapshot(sshSession, credentials, container, newConfig); TelemtInstaller::uploadClientSettingsSnapshot(sshSession, credentials, container, newConfig);
} }
// Only revoke/clear the cached client profile when the container was reinstalled
// (a fresh client is generated in that case). On a light settings update the
// existing client is reused, so revoking it here would break the admin's own
// config (matches 4.8.15.4, which cleared the profile only on container update).
if (reinstallRequired) { if (reinstallRequired) {
clearCachedProfile(serverId, container); clearCachedProfile(serverId, container);
} }
@@ -703,7 +703,7 @@ ErrorCode UsersController::revokeXray(const int row,
); );
if (error != ErrorCode::NoError) { if (error != ErrorCode::NoError) {
logger.error() << "Failed to restart xray container"; logger.error() << "Failed to restart xray container";
return ErrorCode::NoError; return error;
} }
return error; return error;
@@ -466,9 +466,6 @@ XrayProtocolConfig XrayProtocolConfig::fromJson(const QJsonObject &json)
} }
} }
} }
// The client id lives inside the native config (outbounds[0].settings.vnext[0].users[0].id).
// Without extracting it here clientId() returns empty, which broke client revocation
// (e.g. "Clear profile" could not find/revoke the entry in the Share list).
const QJsonArray outbounds = parsed.value(protocols::xray::outbounds).toArray(); const QJsonArray outbounds = parsed.value(protocols::xray::outbounds).toArray();
if (!outbounds.isEmpty()) { if (!outbounds.isEmpty()) {
const QJsonObject settings = outbounds[0].toObject().value(protocols::xray::settings).toObject(); const QJsonObject settings = outbounds[0].toObject().value(protocols::xray::settings).toObject();
@@ -306,10 +306,6 @@ void InstallUiController::updateServerConfig(const QString &serverId, int contai
|| container == DockerContainer::Xray || container == DockerContainer::SSXray; || container == DockerContainer::Xray || container == DockerContainer::SSXray;
if (asyncUpdate) { if (asyncUpdate) {
// serverIsBusy is rendered by PageSetupWizardInstalling (used by Xray/SSXray)
// as "the server is busy installing other software" + a Cancel button, which is
// wrong for a normal settings update. Only MtProxy/Telemt settings pages use this
// signal as a plain in-progress indicator, so scope it to them.
const bool emitBusy = container == DockerContainer::MtProxy || container == DockerContainer::Telemt; const bool emitBusy = container == DockerContainer::MtProxy || container == DockerContainer::Telemt;
if (emitBusy) if (emitBusy)
emit serverIsBusy(true); emit serverIsBusy(true);