Compare commits

..

1 Commits

4 changed files with 2 additions and 15 deletions

View File

@@ -117,9 +117,6 @@ WireguardConfigurator::ConnectionData WireguardConfigurator::prepareWireguardCon
connData.port = portStr;
if (connData.clientPrivKey.isEmpty() || connData.clientPubKey.isEmpty()) {
qCritical() << "WireguardConfigurator: prepareWireguardConfig: genClientKeys failed"
<< "privKey.isEmpty=" << connData.clientPrivKey.isEmpty()
<< "pubKey.isEmpty=" << connData.clientPubKey.isEmpty();
errorCode = ErrorCode::InternalError;
return connData;
}

View File

@@ -273,8 +273,6 @@ ErrorCode InstallController::updateClientConfig(const QString &serverId, DockerC
return ErrorCode::NoError;
}
default:
qCritical() << "InstallController: updateClientConfig: unexpected server kind for serverId=" << serverId
<< "kind=" << static_cast<int>(m_serversRepository->serverKind(serverId));
return ErrorCode::InternalError;
}
}
@@ -1237,18 +1235,14 @@ ErrorCode InstallController::installContainer(const QString &serverId, DockerCon
{
auto adminConfig = m_serversRepository->selfHostedAdminConfig(serverId);
if (!adminConfig.has_value()) {
qCritical() << "InstallController: installContainer: selfHostedAdminConfig nullopt, serverId=" << serverId;
return ErrorCode::InternalError;
}
ServerCredentials credentials = adminConfig->credentials();
if (!credentials.isValid()) {
qCritical() << "InstallController: installContainer: credentials invalid, serverId=" << serverId
<< "host=" << credentials.hostName << "user=" << credentials.userName
<< "port=" << credentials.port << "hasSecret=" << !credentials.secretData.isEmpty();
return ErrorCode::InternalError;
}
SshSession sshSession(this);
QMap<DockerContainer, ContainerConfig> installedContainers;
ErrorCode errorCode = getAlreadyInstalledContainers(credentials, installedContainers, sshSession);
if (errorCode) {

View File

@@ -114,8 +114,6 @@ void InstallUiController::install(DockerContainer container, int port, Transport
const QString newServerId = m_serversController->getServerId(m_serversController->getServersCount() - 1);
const auto admin = m_serversController->selfHostedAdminConfig(newServerId);
if (!admin.has_value()) {
qCritical() << "InstallUiController: install(new): selfHostedAdminConfig nullopt, newServerId=" << newServerId
<< "serversCount=" << m_serversController->getServersCount();
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}
@@ -140,7 +138,6 @@ void InstallUiController::install(DockerContainer container, int port, Transport
} else {
const auto adminBefore = m_serversController->selfHostedAdminConfig(serverId);
if (!adminBefore.has_value()) {
qCritical() << "InstallUiController: install(existing): selfHostedAdminConfig nullopt before install, serverId=" << serverId;
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}
@@ -157,7 +154,6 @@ void InstallUiController::install(DockerContainer container, int port, Transport
const auto adminAfter = m_serversController->selfHostedAdminConfig(serverId);
if (!adminAfter.has_value()) {
qCritical() << "InstallUiController: install(existing): selfHostedAdminConfig nullopt after install, serverId=" << serverId;
emit installationErrorOccurred(ErrorCode::InternalError);
return;
}

View File

@@ -318,7 +318,7 @@ bool KillSwitch::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterIn
LinuxFirewall::setAnchorEnabled(LinuxFirewall::Both, QStringLiteral("100.blockAll"), blockAll);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::IPv4, QStringLiteral("110.allowNets"), allowNets);
LinuxFirewall::updateAllowNets(allownets);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::IPv4, QStringLiteral("120.blockNets"), blockAll);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::IPv4, QStringLiteral("120.blockNets"), blockNets);
LinuxFirewall::updateBlockNets(blocknets);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::Both, QStringLiteral("130.allowMarkedXray"), true);
LinuxFirewall::setAnchorEnabled(LinuxFirewall::IPv4, QStringLiteral("200.allowVPN"), true);