-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add basic auto intervention * Add query api for interventions * Fixup * Update src/interventions/killernetwork.h Co-authored-by: MCleinman <[email protected]> * Remove wrong things --------- Co-authored-by: MCleinman <[email protected]>
- Loading branch information
Showing
5 changed files
with
183 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
if(WIN32) | ||
target_sources(mozillavpn PRIVATE | ||
killernetwork.h | ||
killernetwork.cpp | ||
) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "killernetwork.h" | ||
|
||
#include <qobject.h> | ||
|
||
#include <QObject> | ||
|
||
#include "platforms/windows/windowsservicemanager.h" | ||
|
||
namespace Intervention { | ||
|
||
const QString KillerNetwork::id = "intel.killernetwork"; | ||
|
||
bool KillerNetwork::systemAffected() { | ||
std::unique_ptr<WindowsServiceManager> svm = | ||
WindowsServiceManager::open("Killer Network Service"); | ||
if (svm == nullptr) { | ||
return false; | ||
} | ||
return svm->isRunning(); | ||
} | ||
|
||
} // namespace Intervention |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#pragma once | ||
|
||
#include <QObject> | ||
|
||
class WindowsDaemon; | ||
class WindowsServiceManager; | ||
|
||
namespace Intervention { | ||
|
||
/** | ||
* @brief Intervention for Intel Killer Network. | ||
* | ||
* Intel's Killer Network services silently breaks | ||
* the extension proxy and the split-tunnel driver. | ||
* | ||
* This class currently only detects if a system will be affected. | ||
*/ | ||
class KillerNetwork : public QObject { | ||
Q_OBJECT | ||
public: | ||
/** | ||
* @brief Returns true if the system is affected | ||
* can this Intervention can migitate | ||
*/ | ||
static bool systemAffected(); | ||
|
||
/** | ||
* @brief The ID of the intervention for IPC purposes | ||
* | ||
* @return const QString& | ||
*/ | ||
static const QString id; | ||
}; | ||
|
||
}; // namespace Intervention |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters