Windows updates

This commit is contained in:
Mykola Baibuz 2023-11-12 00:09:37 +02:00
parent 9d456dc18e
commit 6a03eead3f
4 changed files with 6 additions and 16 deletions

View file

@ -94,16 +94,6 @@ void OpenVpnOverCloakProtocol::stop()
qDebug() << "OpenVpnOverCloakProtocol::stop()"; qDebug() << "OpenVpnOverCloakProtocol::stop()";
#ifdef Q_OS_WIN
Utils::signalCtrl(m_ckProcess.processId(), CTRL_C_EVENT);
#endif
m_ckProcess.terminate();
if (Utils::processIsRunning(Utils::executable("ck-client", false))) {
QThread::msleep(1000);
Utils::killProcessByName(Utils::executable("ck-client", false));
}
} }
QString OpenVpnOverCloakProtocol::cloakExecPath() QString OpenVpnOverCloakProtocol::cloakExecPath()

View file

@ -84,12 +84,12 @@ void OpenVpnProtocol::readOpenVpnConfiguration(const QJsonObject &configuration)
QJsonObject cloakConfig = configuration.value(ProtocolProps::key_proto_config_data(Proto::Cloak)).toObject(); QJsonObject cloakConfig = configuration.value(ProtocolProps::key_proto_config_data(Proto::Cloak)).toObject();
cloakConfig["NumConn"] = 1; cloakConfig["NumConn"] = 1;
cloakConfig["ProxyMethod"] = "openvpn"; cloakConfig["ProxyMethod"] = "openvpn";
if (cloakConfig.contains("port")){ if (cloakConfig.contains("port")) {
int portValue = cloakConfig.value("port").toInt(); int portValue = cloakConfig.value("port").toInt();
cloakConfig.remove("port"); cloakConfig.remove("port");
cloakConfig["RemotePort"] = portValue; cloakConfig["RemotePort"] = portValue;
} }
if (cloakConfig.contains("remote")){ if (cloakConfig.contains("remote")) {
QString hostValue = cloakConfig.value("remote").toString(); QString hostValue = cloakConfig.value("remote").toString();
cloakConfig.remove("remote"); cloakConfig.remove("remote");
cloakConfig["RemoteHost"] = hostValue; cloakConfig["RemoteHost"] = hostValue;

View file

@ -226,13 +226,13 @@ QStringList Utils::summarizeRoutes(const QStringList &ips, const QString cidr)
QString Utils::openVpnExecPath() QString Utils::openVpnExecPath()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
return Utils::executable("openvpn/openvpn", true); return Utils::executable("openvpn/ovpncli", true);
#elif defined Q_OS_LINUX #elif defined Q_OS_LINUX
// We have service that runs OpenVPN on Linux. We need to make same // We have service that runs OpenVPN on Linux. We need to make same
// path for client and service. // path for client and service.
return Utils::executable("../../client/bin/openvpn", true); return Utils::executable("../../client/bin/ovpncli", true);
#else #else
return Utils::executable("/openvpn", true); return Utils::executable("ovpncli", true);
#endif #endif
} }

View file

@ -261,7 +261,7 @@ QString TapController::getTapInstallPath()
QString TapController::getOpenVpnPath() QString TapController::getOpenVpnPath()
{ {
return qApp->applicationDirPath() + "\\openvpn\\openvpn.exe"; return qApp->applicationDirPath() + "\\openvpn\\ovpncli.exe";
} }
QString TapController::getTapDriverDir() QString TapController::getTapDriverDir()