mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:46:03 +00:00
UI: Portable: Uninstall driver on exit
If there is no installed Service or boot-filter.
This commit is contained in:
parent
be47b3f6b3
commit
13ecc14775
@ -135,7 +135,7 @@ FortManager::FortManager(QObject *parent) : QObject(parent) { }
|
|||||||
FortManager::~FortManager()
|
FortManager::~FortManager()
|
||||||
{
|
{
|
||||||
if (m_initialized) {
|
if (m_initialized) {
|
||||||
closeDriver();
|
closeOrRemoveDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteManagers();
|
deleteManagers();
|
||||||
@ -334,6 +334,20 @@ void FortManager::closeDriver()
|
|||||||
QCoreApplication::sendPostedEvents(this);
|
QCoreApplication::sendPostedEvents(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FortManager::closeOrRemoveDriver()
|
||||||
|
{
|
||||||
|
if (canInstallDriver() && !IoC<FortSettings>()->hasService()) {
|
||||||
|
const FirewallConf *conf = IoC<ConfManager>()->conf();
|
||||||
|
|
||||||
|
if (!conf->bootFilter()) {
|
||||||
|
removeDriver();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
closeDriver();
|
||||||
|
}
|
||||||
|
|
||||||
bool FortManager::canInstallDriver() const
|
bool FortManager::canInstallDriver() const
|
||||||
{
|
{
|
||||||
const auto settings = IoC<FortSettings>();
|
const auto settings = IoC<FortSettings>();
|
||||||
|
@ -44,7 +44,10 @@ private:
|
|||||||
bool setupDriver();
|
bool setupDriver();
|
||||||
void closeDriver();
|
void closeDriver();
|
||||||
|
|
||||||
|
void closeOrRemoveDriver();
|
||||||
|
|
||||||
bool canInstallDriver() const;
|
bool canInstallDriver() const;
|
||||||
|
|
||||||
void checkReinstallDriver();
|
void checkReinstallDriver();
|
||||||
void checkDriverOpened();
|
void checkDriverOpened();
|
||||||
void checkStartService();
|
void checkStartService();
|
||||||
|
Loading…
Reference in New Issue
Block a user