Merge branch 'dev' of github.com:amnezia-vpn/amnezia-client into feature/new-gui
This commit is contained in:
commit
e0d93eaa9f
15 changed files with 218 additions and 116 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit f339911dcb75d8a199e508cc2c2f32851cf211b8
|
Subproject commit 75e352b40ede4324248b7594b70dbdaa1a7a7f41
|
|
@ -110,18 +110,24 @@ QString OpenVpnConfigurator::processConfigWithLocalSettings(QString jsonConfig)
|
||||||
QJsonObject json = QJsonDocument::fromJson(jsonConfig.toUtf8()).object();
|
QJsonObject json = QJsonDocument::fromJson(jsonConfig.toUtf8()).object();
|
||||||
QString config = json[config_key::config].toString();
|
QString config = json[config_key::config].toString();
|
||||||
|
|
||||||
if (m_settings->routeMode() != Settings::VpnAllSites) {
|
QRegularExpression regex("redirect-gateway.*");
|
||||||
config.replace("redirect-gateway def1 bypass-dhcp", "");
|
config.replace(regex, "");
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(!config.contains("redirect-gateway def1 bypass-dhcp")) {
|
|
||||||
config.append("redirect-gateway def1 bypass-dhcp\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (m_settings->routeMode() == Settings::VpnAllSites) {
|
||||||
|
config.append("\nredirect-gateway def1 ipv6 bypass-dhcp\n");
|
||||||
// Prevent ipv6 leak
|
// Prevent ipv6 leak
|
||||||
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
|
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
|
||||||
config.append("redirect-gateway ipv6\n");
|
config.append("block-ipv6\n");
|
||||||
|
}
|
||||||
|
if (m_settings->routeMode() == Settings::VpnOnlyForwardSites) {
|
||||||
|
// no redirect-gateway
|
||||||
|
}
|
||||||
|
if (m_settings->routeMode() == Settings::VpnAllExceptSites) {
|
||||||
|
config.append("\nredirect-gateway ipv6 !ipv4 bypass-dhcp\n");
|
||||||
|
// Prevent ipv6 leak
|
||||||
|
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
|
||||||
|
config.append("block-ipv6\n");
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef MZ_WINDOWS
|
#ifndef MZ_WINDOWS
|
||||||
config.replace("block-outside-dns", "");
|
config.replace("block-outside-dns", "");
|
||||||
|
@ -146,9 +152,14 @@ QString OpenVpnConfigurator::processConfigWithExportSettings(QString jsonConfig)
|
||||||
QJsonObject json = QJsonDocument::fromJson(jsonConfig.toUtf8()).object();
|
QJsonObject json = QJsonDocument::fromJson(jsonConfig.toUtf8()).object();
|
||||||
QString config = json[config_key::config].toString();
|
QString config = json[config_key::config].toString();
|
||||||
|
|
||||||
if(!config.contains("redirect-gateway def1 bypass-dhcp")) {
|
QRegularExpression regex("redirect-gateway.*");
|
||||||
config.append("redirect-gateway def1 bypass-dhcp\n");
|
config.replace(regex, "");
|
||||||
}
|
|
||||||
|
config.append("\nredirect-gateway def1 ipv6 bypass-dhcp\n");
|
||||||
|
|
||||||
|
// Prevent ipv6 leak
|
||||||
|
config.append("ifconfig-ipv6 fd15:53b6:dead::2/64 fd15:53b6:dead::1\n");
|
||||||
|
config.append("block-ipv6\n");
|
||||||
|
|
||||||
// remove block-outside-dns for all exported configs
|
// remove block-outside-dns for all exported configs
|
||||||
config.replace("block-outside-dns", "");
|
config.replace("block-outside-dns", "");
|
||||||
|
|
|
@ -15,7 +15,7 @@ public:
|
||||||
explicit IOSVpnProtocol(amnezia::Proto proto, const QJsonObject& configuration, QObject* parent = nullptr);
|
explicit IOSVpnProtocol(amnezia::Proto proto, const QJsonObject& configuration, QObject* parent = nullptr);
|
||||||
static IOSVpnProtocol* instance();
|
static IOSVpnProtocol* instance();
|
||||||
|
|
||||||
virtual ~IOSVpnProtocol() override = default;
|
virtual ~IOSVpnProtocol() override;
|
||||||
|
|
||||||
bool initialize();
|
bool initialize();
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,12 @@ IOSVpnProtocol::IOSVpnProtocol(Proto proto, const QJsonObject &configuration, QO
|
||||||
connect(this, &IOSVpnProtocol::newTransmittedDataCount, this, &IOSVpnProtocol::setBytesChanged);
|
connect(this, &IOSVpnProtocol::newTransmittedDataCount, this, &IOSVpnProtocol::setBytesChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IOSVpnProtocol::~IOSVpnProtocol()
|
||||||
|
{
|
||||||
|
qDebug() << "IOSVpnProtocol::~IOSVpnProtocol()";
|
||||||
|
IOSVpnProtocol::stop();
|
||||||
|
}
|
||||||
|
|
||||||
IOSVpnProtocol* IOSVpnProtocol::instance() {
|
IOSVpnProtocol* IOSVpnProtocol::instance() {
|
||||||
return s_instance;
|
return s_instance;
|
||||||
}
|
}
|
||||||
|
@ -159,8 +165,11 @@ void IOSVpnProtocol::checkStatus()
|
||||||
|
|
||||||
m_checkingStatus = true;
|
m_checkingStatus = true;
|
||||||
|
|
||||||
|
QPointer<IOSVpnProtocol> weakSelf = this;
|
||||||
|
|
||||||
[m_controller checkStatusWithCallback:^(NSString* serverIpv4Gateway, NSString* deviceIpv4Address,
|
[m_controller checkStatusWithCallback:^(NSString* serverIpv4Gateway, NSString* deviceIpv4Address,
|
||||||
NSString* configString) {
|
NSString* configString) {
|
||||||
|
if (!weakSelf) return;
|
||||||
QString config = QString::fromNSString(configString);
|
QString config = QString::fromNSString(configString);
|
||||||
|
|
||||||
m_checkingStatus = false;
|
m_checkingStatus = false;
|
||||||
|
@ -185,7 +194,7 @@ void IOSVpnProtocol::checkStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit newTransmittedDataCount(rxBytes, txBytes);
|
emit weakSelf->newTransmittedDataCount(rxBytes, txBytes);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ QString OpenVpnProtocol::defaultConfigPath()
|
||||||
void OpenVpnProtocol::stop()
|
void OpenVpnProtocol::stop()
|
||||||
{
|
{
|
||||||
qDebug() << "OpenVpnProtocol::stop()";
|
qDebug() << "OpenVpnProtocol::stop()";
|
||||||
|
setConnectionState(VpnProtocol::Disconnecting);
|
||||||
|
|
||||||
// TODO: need refactoring
|
// TODO: need refactoring
|
||||||
// sendTermSignal() will even return true while server connected ???
|
// sendTermSignal() will even return true while server connected ???
|
||||||
|
@ -52,10 +53,10 @@ void OpenVpnProtocol::stop()
|
||||||
if (!sendTermSignal()) {
|
if (!sendTermSignal()) {
|
||||||
killOpenVpnProcess();
|
killOpenVpnProcess();
|
||||||
}
|
}
|
||||||
|
QThread::msleep(10);
|
||||||
m_managementServer.stop();
|
m_managementServer.stop();
|
||||||
qApp->processEvents();
|
|
||||||
setConnectionState(Vpn::ConnectionState::Disconnecting);
|
|
||||||
}
|
}
|
||||||
|
setConnectionState(VpnProtocol::Disconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorCode OpenVpnProtocol::prepare()
|
ErrorCode OpenVpnProtocol::prepare()
|
||||||
|
@ -78,11 +79,9 @@ ErrorCode OpenVpnProtocol::prepare()
|
||||||
|
|
||||||
void OpenVpnProtocol::killOpenVpnProcess()
|
void OpenVpnProtocol::killOpenVpnProcess()
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_IOS
|
|
||||||
if (m_openVpnProcess){
|
if (m_openVpnProcess){
|
||||||
m_openVpnProcess->close();
|
m_openVpnProcess->close();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenVpnProtocol::readOpenVpnConfiguration(const QJsonObject &configuration)
|
void OpenVpnProtocol::readOpenVpnConfiguration(const QJsonObject &configuration)
|
||||||
|
@ -150,7 +149,6 @@ void OpenVpnProtocol::updateRouteGateway(QString line)
|
||||||
|
|
||||||
ErrorCode OpenVpnProtocol::start()
|
ErrorCode OpenVpnProtocol::start()
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_IOS
|
|
||||||
//qDebug() << "Start OpenVPN connection";
|
//qDebug() << "Start OpenVPN connection";
|
||||||
OpenVpnProtocol::stop();
|
OpenVpnProtocol::stop();
|
||||||
|
|
||||||
|
@ -164,6 +162,27 @@ ErrorCode OpenVpnProtocol::start()
|
||||||
return lastError();
|
return lastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detect default gateway
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QProcess p;
|
||||||
|
p.setProcessChannelMode(QProcess::MergedChannels);
|
||||||
|
|
||||||
|
p.start("route", QStringList() << "-n" << "get" << "default");
|
||||||
|
p.waitForFinished();
|
||||||
|
QString s = p.readAll();
|
||||||
|
|
||||||
|
QRegularExpression rx(R"(gateway:\s*(\d+\.\d+\.\d+\.\d+))");
|
||||||
|
QRegularExpressionMatch match = rx.match(s);
|
||||||
|
if (match.hasMatch()) {
|
||||||
|
m_routeGateway = match.captured(1);
|
||||||
|
qDebug() << "Set VPN route gateway" << m_routeGateway;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qWarning() << "Unable to set VPN route gateway, output:\n" << s;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// QString vpnLogFileNamePath = Utils::systemLogPath() + "/openvpn.log";
|
// QString vpnLogFileNamePath = Utils::systemLogPath() + "/openvpn.log";
|
||||||
// Utils::createEmptyFile(vpnLogFileNamePath);
|
// Utils::createEmptyFile(vpnLogFileNamePath);
|
||||||
|
|
||||||
|
@ -216,9 +235,6 @@ ErrorCode OpenVpnProtocol::start()
|
||||||
//startTimeoutTimer();
|
//startTimeoutTimer();
|
||||||
|
|
||||||
return ErrorCode::NoError;
|
return ErrorCode::NoError;
|
||||||
#else
|
|
||||||
return ErrorCode::NotImplementedError;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenVpnProtocol::sendTermSignal()
|
bool OpenVpnProtocol::sendTermSignal()
|
||||||
|
|
|
@ -66,12 +66,18 @@ void SitesLogic::onPushButtonAddCustomSitesClicked()
|
||||||
m_settings->addVpnSite(mode, newSite, ip);
|
m_settings->addVpnSite(mode, newSite, ip);
|
||||||
|
|
||||||
if (!ip.isEmpty()) {
|
if (!ip.isEmpty()) {
|
||||||
uiLogic()->m_vpnConnection->addRoutes(QStringList() << ip);
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "addRoutes",
|
||||||
uiLogic()->m_vpnConnection->flushDns();
|
Qt::QueuedConnection,
|
||||||
} else if (Utils::ipAddressWithSubnetRegExp().exactMatch(newSite)) {
|
Q_ARG(QStringList, QStringList() << ip));
|
||||||
uiLogic()->m_vpnConnection->addRoutes(QStringList() << newSite);
|
|
||||||
uiLogic()->m_vpnConnection->flushDns();
|
|
||||||
}
|
}
|
||||||
|
else if (Utils::ipAddressWithSubnetRegExp().exactMatch(newSite)) {
|
||||||
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "addRoutes",
|
||||||
|
Qt::QueuedConnection,
|
||||||
|
Q_ARG(QStringList, QStringList() << newSite));
|
||||||
|
}
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "flushDns",
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
onUpdatePage();
|
onUpdatePage();
|
||||||
};
|
};
|
||||||
|
@ -118,17 +124,19 @@ void SitesLogic::onPushButtonSitesDeleteClicked(QStringList items)
|
||||||
return;
|
return;
|
||||||
// sites.append(siteModel->data(row, 0).toString());
|
// sites.append(siteModel->data(row, 0).toString());
|
||||||
|
|
||||||
if (uiLogic()->m_vpnConnection->connectionState() == Vpn::ConnectionState::Connected) {
|
if (uiLogic()->m_vpnConnection && uiLogic()->m_vpnConnection->connectionState() == VpnProtocol::Connected) {
|
||||||
// ips.append(siteModel->data(row, 1).toString());
|
ips.append(siteModel->data(row, 1).toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_settings->removeVpnSites(mode, sites);
|
m_settings->removeVpnSites(mode, sites);
|
||||||
|
|
||||||
if (uiLogic()->m_vpnConnection->connectionState() == Vpn::ConnectionState::Connected) {
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "deleteRoutes",
|
||||||
uiLogic()->m_vpnConnection->deleteRoutes(ips);
|
Qt::QueuedConnection,
|
||||||
uiLogic()->m_vpnConnection->flushDns();
|
Q_ARG(QStringList, ips));
|
||||||
}
|
|
||||||
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "flushDns",
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
onUpdatePage();
|
onUpdatePage();
|
||||||
}
|
}
|
||||||
|
@ -189,8 +197,12 @@ void SitesLogic::onPushButtonSitesImportClicked(const QString &fileName)
|
||||||
m_settings->addVpnIps(mode, ips);
|
m_settings->addVpnIps(mode, ips);
|
||||||
m_settings->addVpnSites(mode, sites);
|
m_settings->addVpnSites(mode, sites);
|
||||||
|
|
||||||
uiLogic()->m_vpnConnection->addRoutes(QStringList() << ips);
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "addRoutes",
|
||||||
uiLogic()->m_vpnConnection->flushDns();
|
Qt::QueuedConnection,
|
||||||
|
Q_ARG(QStringList, ips));
|
||||||
|
|
||||||
|
QMetaObject::invokeMethod(uiLogic()->m_vpnConnection, "flushDns",
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
|
||||||
onUpdatePage();
|
onUpdatePage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,9 @@ QString Utils::openVpnExecPath()
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
return Utils::executable("openvpn/openvpn", true);
|
return Utils::executable("openvpn/openvpn", true);
|
||||||
#elif defined Q_OS_LINUX
|
#elif defined Q_OS_LINUX
|
||||||
return Utils::usrExecutable("openvpn");
|
// We have service that runs OpenVPN on Linux. We need to make same
|
||||||
|
// path for client and service.
|
||||||
|
return Utils::executable("../../client/bin/openvpn", true);
|
||||||
#else
|
#else
|
||||||
return Utils::executable("/openvpn", true);
|
return Utils::executable("/openvpn", true);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
VpnConnection::VpnConnection(std::shared_ptr<Settings> settings,
|
VpnConnection::VpnConnection(std::shared_ptr<Settings> settings,
|
||||||
std::shared_ptr<VpnConfigurator> configurator, QObject* parent) : QObject(parent),
|
std::shared_ptr<VpnConfigurator> configurator, QObject* parent) : QObject(parent),
|
||||||
m_settings(settings),
|
m_settings(settings),
|
||||||
m_configurator(configurator),
|
m_configurator(configurator)
|
||||||
m_isIOSConnected(false)
|
|
||||||
{
|
{
|
||||||
|
m_checkTimer.setInterval(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
VpnConnection::~VpnConnection()
|
VpnConnection::~VpnConnection()
|
||||||
|
@ -96,31 +96,16 @@ void VpnConnection::onConnectionStateChanged(Vpn::ConnectionState state)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_IOS
|
#ifdef Q_OS_IOS
|
||||||
if (state == Vpn::ConnectionState::Connected){
|
if (state == VpnProtocol::Connected) {
|
||||||
m_isIOSConnected = true;
|
m_checkTimer.start();
|
||||||
checkIOSStatus();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_isIOSConnected = false;
|
m_checkTimer.stop();
|
||||||
// m_receivedBytes = 0;
|
|
||||||
// m_sentBytes = 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
emit connectionStateChanged(state);
|
emit connectionStateChanged(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_IOS
|
|
||||||
void VpnConnection::checkIOSStatus()
|
|
||||||
{
|
|
||||||
QTimer::singleShot(1000, [this]() {
|
|
||||||
if(m_isIOSConnected){
|
|
||||||
iosVpnProtocol->checkStatus();
|
|
||||||
checkIOSStatus();
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const QString &VpnConnection::remoteAddress() const
|
const QString &VpnConnection::remoteAddress() const
|
||||||
{
|
{
|
||||||
return m_remoteAddress;
|
return m_remoteAddress;
|
||||||
|
@ -236,7 +221,6 @@ QString VpnConnection::createVpnConfigurationForProto(int serverIndex,
|
||||||
const ServerCredentials &credentials, DockerContainer container, const QJsonObject &containerConfig, Proto proto,
|
const ServerCredentials &credentials, DockerContainer container, const QJsonObject &containerConfig, Proto proto,
|
||||||
ErrorCode *errorCode)
|
ErrorCode *errorCode)
|
||||||
{
|
{
|
||||||
ErrorCode e = ErrorCode::NoError;
|
|
||||||
QMap<Proto, QString> lastVpnConfig = getLastVpnConfig(containerConfig);
|
QMap<Proto, QString> lastVpnConfig = getLastVpnConfig(containerConfig);
|
||||||
|
|
||||||
QString configData;
|
QString configData;
|
||||||
|
@ -246,19 +230,16 @@ QString VpnConnection::createVpnConfigurationForProto(int serverIndex,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
configData = m_configurator->genVpnProtocolConfig(credentials,
|
configData = m_configurator->genVpnProtocolConfig(credentials,
|
||||||
container, containerConfig, proto, &e);
|
container, containerConfig, proto, errorCode);
|
||||||
|
|
||||||
|
if (errorCode && *errorCode) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
QString configDataBeforeLocalProcessing = configData;
|
QString configDataBeforeLocalProcessing = configData;
|
||||||
|
|
||||||
configData = m_configurator->processConfigWithLocalSettings(serverIndex, container, proto, configData);
|
configData = m_configurator->processConfigWithLocalSettings(serverIndex, container, proto, configData);
|
||||||
|
|
||||||
|
|
||||||
if (errorCode && e) {
|
|
||||||
*errorCode = e;
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (serverIndex >= 0) {
|
if (serverIndex >= 0) {
|
||||||
qDebug() << "VpnConnection::createVpnConfiguration: saving config for server #" << serverIndex << container << proto;
|
qDebug() << "VpnConnection::createVpnConfiguration: saving config for server #" << serverIndex << container << proto;
|
||||||
QJsonObject protoObject = m_settings->protocolConfig(serverIndex, container, proto);
|
QJsonObject protoObject = m_settings->protocolConfig(serverIndex, container, proto);
|
||||||
|
@ -267,7 +248,6 @@ QString VpnConnection::createVpnConfigurationForProto(int serverIndex,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCode) *errorCode = e;
|
|
||||||
return configData;
|
return configData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,18 +255,15 @@ QJsonObject VpnConnection::createVpnConfiguration(int serverIndex,
|
||||||
const ServerCredentials &credentials, DockerContainer container,
|
const ServerCredentials &credentials, DockerContainer container,
|
||||||
const QJsonObject &containerConfig, ErrorCode *errorCode)
|
const QJsonObject &containerConfig, ErrorCode *errorCode)
|
||||||
{
|
{
|
||||||
ErrorCode e = ErrorCode::NoError;
|
|
||||||
QJsonObject vpnConfiguration;
|
QJsonObject vpnConfiguration;
|
||||||
|
|
||||||
|
|
||||||
for (ProtocolEnumNS::Proto proto : ContainerProps::protocolsForContainer(container)) {
|
for (ProtocolEnumNS::Proto proto : ContainerProps::protocolsForContainer(container)) {
|
||||||
QJsonObject vpnConfigData = QJsonDocument::fromJson(
|
QJsonObject vpnConfigData = QJsonDocument::fromJson(
|
||||||
createVpnConfigurationForProto(
|
createVpnConfigurationForProto(
|
||||||
serverIndex, credentials, container, containerConfig, proto, &e).toUtf8()).
|
serverIndex, credentials, container, containerConfig, proto, errorCode).toUtf8()).
|
||||||
object();
|
object();
|
||||||
|
|
||||||
if (e) {
|
if (errorCode && *errorCode) {
|
||||||
if (errorCode) *errorCode = e;
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,16 +333,18 @@ void VpnConnection::connectToVpn(int serverIndex,
|
||||||
m_vpnProtocol.reset(androidVpnProtocol);
|
m_vpnProtocol.reset(androidVpnProtocol);
|
||||||
#elif defined Q_OS_IOS
|
#elif defined Q_OS_IOS
|
||||||
Proto proto = ContainerProps::defaultProtocol(container);
|
Proto proto = ContainerProps::defaultProtocol(container);
|
||||||
//if (iosVpnProtocol==NULL) {
|
auto iosVpnProtocol = new IOSVpnProtocol(proto, m_vpnConfiguration);
|
||||||
iosVpnProtocol = new IOSVpnProtocol(proto, m_vpnConfiguration);
|
|
||||||
//}
|
|
||||||
// IOSVpnProtocol *iosVpnProtocol = new IOSVpnProtocol(proto, m_vpnConfiguration);
|
|
||||||
if (!iosVpnProtocol->initialize()) {
|
if (!iosVpnProtocol->initialize()) {
|
||||||
qDebug() << QString("Init failed") ;
|
qDebug() << QString("Init failed") ;
|
||||||
emit Vpn::ConnectionState::Error;
|
emit VpnProtocol::Error;
|
||||||
|
iosVpnProtocol->deleteLater();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connect(&m_checkTimer, &QTimer::timeout, iosVpnProtocol, &IOSVpnProtocol::checkStatus);
|
||||||
m_vpnProtocol.reset(iosVpnProtocol);
|
m_vpnProtocol.reset(iosVpnProtocol);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
createProtocolConnections();
|
createProtocolConnections();
|
||||||
|
@ -439,7 +418,11 @@ void VpnConnection::disconnectFromVpn()
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_vpnProtocol.data()->stop();
|
|
||||||
|
if (m_vpnProtocol) {
|
||||||
|
m_vpnProtocol->deleteLater();
|
||||||
|
}
|
||||||
|
m_vpnProtocol = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vpn::ConnectionState VpnConnection::connectionState()
|
Vpn::ConnectionState VpnConnection::connectionState()
|
||||||
|
@ -450,10 +433,6 @@ Vpn::ConnectionState VpnConnection::connectionState()
|
||||||
|
|
||||||
bool VpnConnection::isConnected() const
|
bool VpnConnection::isConnected() const
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_IOS
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!m_vpnProtocol.data()) {
|
if (!m_vpnProtocol.data()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QRemoteObjectNode>
|
#include <QRemoteObjectNode>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include "protocols/vpnprotocol.h"
|
#include "protocols/vpnprotocol.h"
|
||||||
#include "core/defs.h"
|
#include "core/defs.h"
|
||||||
|
@ -50,17 +51,12 @@ public:
|
||||||
const QJsonObject &containerConfig, ErrorCode *errorCode = nullptr);
|
const QJsonObject &containerConfig, ErrorCode *errorCode = nullptr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool isConnected() const;
|
bool isConnected() const;
|
||||||
bool isDisconnected() const;
|
bool isDisconnected() const;
|
||||||
|
|
||||||
Vpn::ConnectionState connectionState();
|
Vpn::ConnectionState connectionState();
|
||||||
QSharedPointer<VpnProtocol> vpnProtocol() const;
|
QSharedPointer<VpnProtocol> vpnProtocol() const;
|
||||||
|
|
||||||
void addRoutes(const QStringList &ips);
|
|
||||||
void deleteRoutes(const QStringList &ips);
|
|
||||||
void flushDns();
|
|
||||||
|
|
||||||
const QString &remoteAddress() const;
|
const QString &remoteAddress() const;
|
||||||
void addSitesRoutes(const QString &gw, Settings::RouteMode mode);
|
void addSitesRoutes(const QString &gw, Settings::RouteMode mode);
|
||||||
|
|
||||||
|
@ -74,6 +70,11 @@ public slots:
|
||||||
|
|
||||||
void disconnectFromVpn();
|
void disconnectFromVpn();
|
||||||
|
|
||||||
|
|
||||||
|
void addRoutes(const QStringList &ips);
|
||||||
|
void deleteRoutes(const QStringList &ips);
|
||||||
|
void flushDns();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void bytesChanged(quint64 receivedBytes, quint64 sentBytes);
|
void bytesChanged(quint64 receivedBytes, quint64 sentBytes);
|
||||||
void connectionStateChanged(Vpn::ConnectionState state);
|
void connectionStateChanged(Vpn::ConnectionState state);
|
||||||
|
@ -85,10 +86,6 @@ protected slots:
|
||||||
void onBytesChanged(quint64 receivedBytes, quint64 sentBytes);
|
void onBytesChanged(quint64 receivedBytes, quint64 sentBytes);
|
||||||
void onConnectionStateChanged(Vpn::ConnectionState state);
|
void onConnectionStateChanged(Vpn::ConnectionState state);
|
||||||
|
|
||||||
#ifdef Q_OS_IOS
|
|
||||||
void checkIOSStatus();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QSharedPointer<VpnProtocol> m_vpnProtocol;
|
QSharedPointer<VpnProtocol> m_vpnProtocol;
|
||||||
|
|
||||||
|
@ -99,14 +96,14 @@ private:
|
||||||
QJsonObject m_vpnConfiguration;
|
QJsonObject m_vpnConfiguration;
|
||||||
QJsonObject m_routeMode;
|
QJsonObject m_routeMode;
|
||||||
QString m_remoteAddress;
|
QString m_remoteAddress;
|
||||||
bool m_isIOSConnected; //remove later move to isConnected,
|
|
||||||
|
// Only for iOS for now, check counters
|
||||||
|
QTimer m_checkTimer;
|
||||||
|
|
||||||
#ifdef AMNEZIA_DESKTOP
|
#ifdef AMNEZIA_DESKTOP
|
||||||
IpcClient *m_IpcClient {nullptr};
|
IpcClient *m_IpcClient {nullptr};
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_IOS
|
|
||||||
IOSVpnProtocol * iosVpnProtocol{nullptr};
|
|
||||||
#endif
|
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
AndroidVpnProtocol* androidVpnProtocol = nullptr;
|
AndroidVpnProtocol* androidVpnProtocol = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ IpcServer::IpcServer(QObject *parent):
|
||||||
|
|
||||||
int IpcServer::createPrivilegedProcess()
|
int IpcServer::createPrivilegedProcess()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::createPrivilegedProcess";
|
||||||
|
#endif
|
||||||
|
|
||||||
m_localpid++;
|
m_localpid++;
|
||||||
|
|
||||||
ProcessDescriptor pd(this);
|
ProcessDescriptor pd(this);
|
||||||
|
@ -68,31 +72,55 @@ int IpcServer::createPrivilegedProcess()
|
||||||
|
|
||||||
int IpcServer::routeAddList(const QString &gw, const QStringList &ips)
|
int IpcServer::routeAddList(const QString &gw, const QStringList &ips)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::routeAddList";
|
||||||
|
#endif
|
||||||
|
|
||||||
return Router::routeAddList(gw, ips);
|
return Router::routeAddList(gw, ips);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IpcServer::clearSavedRoutes()
|
bool IpcServer::clearSavedRoutes()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::clearSavedRoutes";
|
||||||
|
#endif
|
||||||
|
|
||||||
return Router::clearSavedRoutes();
|
return Router::clearSavedRoutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IpcServer::routeDeleteList(const QString &gw, const QStringList &ips)
|
bool IpcServer::routeDeleteList(const QString &gw, const QStringList &ips)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::routeDeleteList";
|
||||||
|
#endif
|
||||||
|
|
||||||
return Router::routeDeleteList(gw ,ips);
|
return Router::routeDeleteList(gw ,ips);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IpcServer::flushDns()
|
void IpcServer::flushDns()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::flushDns";
|
||||||
|
#endif
|
||||||
|
|
||||||
return Router::flushDns();
|
return Router::flushDns();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IpcServer::resetIpStack()
|
void IpcServer::resetIpStack()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::resetIpStack";
|
||||||
|
#endif
|
||||||
|
|
||||||
Router::resetIpStack();
|
Router::resetIpStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IpcServer::checkAndInstallDriver()
|
bool IpcServer::checkAndInstallDriver()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::checkAndInstallDriver";
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
return TapController::checkAndSetup();
|
return TapController::checkAndSetup();
|
||||||
#else
|
#else
|
||||||
|
@ -102,6 +130,10 @@ bool IpcServer::checkAndInstallDriver()
|
||||||
|
|
||||||
QStringList IpcServer::getTapList()
|
QStringList IpcServer::getTapList()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::getTapList";
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
return TapController::getTapList();
|
return TapController::getTapList();
|
||||||
#else
|
#else
|
||||||
|
@ -111,13 +143,20 @@ QStringList IpcServer::getTapList()
|
||||||
|
|
||||||
void IpcServer::cleanUp()
|
void IpcServer::cleanUp()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
qDebug() << "IpcServer::cleanUp";
|
qDebug() << "IpcServer::cleanUp";
|
||||||
|
#endif
|
||||||
|
|
||||||
Logger::deinit();
|
Logger::deinit();
|
||||||
Logger::cleanUp();
|
Logger::cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IpcServer::setLogsEnabled(bool enabled)
|
void IpcServer::setLogsEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::setLogsEnabled";
|
||||||
|
#endif
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
Logger::init();
|
Logger::init();
|
||||||
}
|
}
|
||||||
|
@ -128,6 +167,10 @@ void IpcServer::setLogsEnabled(bool enabled)
|
||||||
|
|
||||||
bool IpcServer::copyWireguardConfig(const QString &sourcePath)
|
bool IpcServer::copyWireguardConfig(const QString &sourcePath)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::copyWireguardConfig";
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
const QString wireguardConfigPath = "/etc/wireguard/wg99.conf";
|
const QString wireguardConfigPath = "/etc/wireguard/wg99.conf";
|
||||||
if (QFile::exists(wireguardConfigPath))
|
if (QFile::exists(wireguardConfigPath))
|
||||||
|
@ -147,6 +190,10 @@ bool IpcServer::copyWireguardConfig(const QString &sourcePath)
|
||||||
|
|
||||||
bool IpcServer::isWireguardRunning()
|
bool IpcServer::isWireguardRunning()
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::isWireguardRunning";
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
QProcess checkWireguardStatusProcess;
|
QProcess checkWireguardStatusProcess;
|
||||||
|
|
||||||
|
@ -170,5 +217,9 @@ bool IpcServer::isWireguardRunning()
|
||||||
|
|
||||||
bool IpcServer::isWireguardConfigExists(const QString &configPath)
|
bool IpcServer::isWireguardConfigExists(const QString &configPath)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug() << "IpcServer::isWireguardConfigExists";
|
||||||
|
#endif
|
||||||
|
|
||||||
return QFileInfo::exists(configPath);
|
return QFileInfo::exists(configPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,7 @@ if(WIN32)
|
||||||
set(DEPLOY_PLATFORM_PATH "windows/x32")
|
set(DEPLOY_PLATFORM_PATH "windows/x32")
|
||||||
endif()
|
endif()
|
||||||
elseif(LINUX)
|
elseif(LINUX)
|
||||||
set(DEPLOY_PLATFORM_PATH "linux/service")
|
set(DEPLOY_PLATFORM_PATH "linux/client")
|
||||||
elseif(APPLE AND NOT IOS)
|
elseif(APPLE AND NOT IOS)
|
||||||
set(DEPLOY_PLATFORM_PATH "macos")
|
set(DEPLOY_PLATFORM_PATH "macos")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -50,7 +50,6 @@ bool RouterLinux::routeAdd(const QString &ipWithSubnet, const QString &gw, const
|
||||||
|
|
||||||
route.rt_flags = RTF_UP | RTF_GATEWAY;
|
route.rt_flags = RTF_UP | RTF_GATEWAY;
|
||||||
route.rt_metric = 0;
|
route.rt_metric = 0;
|
||||||
//route.rt_dev = "ens33";
|
|
||||||
|
|
||||||
if (int err = ioctl(sock, SIOCADDRT, &route) < 0)
|
if (int err = ioctl(sock, SIOCADDRT, &route) < 0)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +59,8 @@ bool RouterLinux::routeAdd(const QString &ipWithSubnet, const QString &gw, const
|
||||||
<< " mask " << ((struct sockaddr_in *)&route.rt_genmask)->sin_addr.s_addr << " " << err;
|
<< " mask " << ((struct sockaddr_in *)&route.rt_genmask)->sin_addr.s_addr << " " << err;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_addedRoutes.append({ipWithSubnet, gw});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,18 +77,23 @@ int RouterLinux::routeAddList(const QString &gw, const QStringList &ips)
|
||||||
|
|
||||||
bool RouterLinux::clearSavedRoutes()
|
bool RouterLinux::clearSavedRoutes()
|
||||||
{
|
{
|
||||||
// No need to delete routes after iface down
|
int temp_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||||
return true;
|
int cnt = 0;
|
||||||
|
for (const Route &r: m_addedRoutes) {
|
||||||
// int cnt = 0;
|
if (routeDelete(r.dst, r.gw, temp_sock)) cnt++;
|
||||||
// for (const QString &ip: m_addedRoutes) {
|
}
|
||||||
// if (routeDelete(ip)) cnt++;
|
bool ret = (cnt == m_addedRoutes.count());
|
||||||
// }
|
m_addedRoutes.clear();
|
||||||
// return (cnt == m_addedRoutes.count());
|
close(temp_sock);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RouterLinux::routeDelete(const QString &ipWithSubnet, const QString &gw, const int &sock)
|
bool RouterLinux::routeDelete(const QString &ipWithSubnet, const QString &gw, const int &sock)
|
||||||
{
|
{
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug().noquote() << "RouterMac::routeDelete: " << ipWithSubnet << gw;
|
||||||
|
#endif
|
||||||
|
|
||||||
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
||||||
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ class RouterLinux : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
struct Route {
|
||||||
|
QString dst;
|
||||||
|
QString gw;
|
||||||
|
};
|
||||||
|
|
||||||
static RouterLinux& Instance();
|
static RouterLinux& Instance();
|
||||||
|
|
||||||
bool routeAdd(const QString &ip, const QString &gw, const int &sock);
|
bool routeAdd(const QString &ip, const QString &gw, const int &sock);
|
||||||
|
@ -31,7 +36,7 @@ private:
|
||||||
RouterLinux(RouterLinux const &) = delete;
|
RouterLinux(RouterLinux const &) = delete;
|
||||||
RouterLinux& operator= (RouterLinux const&) = delete;
|
RouterLinux& operator= (RouterLinux const&) = delete;
|
||||||
|
|
||||||
QList<QString> m_addedRoutes;
|
QList<Route> m_addedRoutes;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ROUTERLINUX_H
|
#endif // ROUTERLINUX_H
|
||||||
|
|
|
@ -16,6 +16,10 @@ bool RouterMac::routeAdd(const QString &ipWithSubnet, const QString &gw)
|
||||||
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
||||||
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
||||||
|
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug().noquote() << "RouterMac::routeAdd: " << ipWithSubnet << gw;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!Utils::checkIPv4Format(ip) || !Utils::checkIPv4Format(gw)) {
|
if (!Utils::checkIPv4Format(ip) || !Utils::checkIPv4Format(gw)) {
|
||||||
qCritical().noquote() << "Critical, trying to add invalid route: " << ip << gw;
|
qCritical().noquote() << "Critical, trying to add invalid route: " << ip << gw;
|
||||||
return false;
|
return false;
|
||||||
|
@ -39,7 +43,9 @@ bool RouterMac::routeAdd(const QString &ipWithSubnet, const QString &gw)
|
||||||
strcpy(argv[i], parts.at(i).toStdString().c_str());
|
strcpy(argv[i], parts.at(i).toStdString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO refactor
|
||||||
mainRouteIface(argc, argv);
|
mainRouteIface(argc, argv);
|
||||||
|
m_addedRoutes.append({ipWithSubnet, gw});
|
||||||
|
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
delete [] argv[i];
|
delete [] argv[i];
|
||||||
|
@ -59,14 +65,13 @@ int RouterMac::routeAddList(const QString &gw, const QStringList &ips)
|
||||||
|
|
||||||
bool RouterMac::clearSavedRoutes()
|
bool RouterMac::clearSavedRoutes()
|
||||||
{
|
{
|
||||||
// No need to delete routes after iface down
|
int cnt = 0;
|
||||||
return true;
|
for (const Route &r: m_addedRoutes) {
|
||||||
|
if (routeDelete(r.dst, r.gw)) cnt++;
|
||||||
// int cnt = 0;
|
}
|
||||||
// for (const QString &ip: m_addedRoutes) {
|
bool ret = (cnt == m_addedRoutes.count());
|
||||||
// if (routeDelete(ip)) cnt++;
|
m_addedRoutes.clear();
|
||||||
// }
|
return ret;
|
||||||
// return (cnt == m_addedRoutes.count());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RouterMac::routeDelete(const QString &ipWithSubnet, const QString &gw)
|
bool RouterMac::routeDelete(const QString &ipWithSubnet, const QString &gw)
|
||||||
|
@ -74,6 +79,10 @@ bool RouterMac::routeDelete(const QString &ipWithSubnet, const QString &gw)
|
||||||
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
QString ip = Utils::ipAddressFromIpWithSubnet(ipWithSubnet);
|
||||||
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
QString mask = Utils::netMaskFromIpWithSubnet(ipWithSubnet);
|
||||||
|
|
||||||
|
#ifdef MZ_DEBUG
|
||||||
|
qDebug().noquote() << "RouterMac::routeDelete: " << ipWithSubnet << gw;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!Utils::checkIPv4Format(ip) || !Utils::checkIPv4Format(gw)) {
|
if (!Utils::checkIPv4Format(ip) || !Utils::checkIPv4Format(gw)) {
|
||||||
qCritical().noquote() << "Critical, trying to remove invalid route: " << ip << gw;
|
qCritical().noquote() << "Critical, trying to remove invalid route: " << ip << gw;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -18,6 +18,11 @@ class RouterMac : public QObject
|
||||||
public:
|
public:
|
||||||
static RouterMac& Instance();
|
static RouterMac& Instance();
|
||||||
|
|
||||||
|
struct Route {
|
||||||
|
QString dst;
|
||||||
|
QString gw;
|
||||||
|
};
|
||||||
|
|
||||||
bool routeAdd(const QString &ip, const QString &gw);
|
bool routeAdd(const QString &ip, const QString &gw);
|
||||||
int routeAddList(const QString &gw, const QStringList &ips);
|
int routeAddList(const QString &gw, const QStringList &ips);
|
||||||
bool clearSavedRoutes();
|
bool clearSavedRoutes();
|
||||||
|
@ -32,7 +37,7 @@ private:
|
||||||
RouterMac(RouterMac const &) = delete;
|
RouterMac(RouterMac const &) = delete;
|
||||||
RouterMac& operator= (RouterMac const&) = delete;
|
RouterMac& operator= (RouterMac const&) = delete;
|
||||||
|
|
||||||
QList<QString> m_addedRoutes;
|
QList<Route> m_addedRoutes;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ROUTERMAC_H
|
#endif // ROUTERMAC_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue