feat: initialize cache cleaner
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
#include "spoofing.h"
|
#include "spoofing.h"
|
||||||
|
#include "cachecleaner.h"
|
||||||
|
|
||||||
#include <nerutils/log.h>
|
#include <nerutils/log.h>
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ bool setProxyAddress(bool enable, const std::string& proxyAddr)
|
|||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
Proxy* proxy = nullptr;
|
Proxy* proxy = nullptr;
|
||||||
|
CacheCleaner* cleaner = nullptr;
|
||||||
|
|
||||||
void cleanup()
|
void cleanup()
|
||||||
{
|
{
|
||||||
@@ -72,6 +74,12 @@ void cleanup()
|
|||||||
Log::info("Shutting down proxy");
|
Log::info("Shutting down proxy");
|
||||||
proxy->shutdown();
|
proxy->shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cleaner)
|
||||||
|
{
|
||||||
|
Log::info("Shutting down cache cleaner");
|
||||||
|
cleaner->shutdown();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI consoleHandler(DWORD dwType)
|
BOOL WINAPI consoleHandler(DWORD dwType)
|
||||||
@@ -117,6 +125,13 @@ int main()
|
|||||||
|
|
||||||
spoofer->init(proxy);
|
spoofer->init(proxy);
|
||||||
|
|
||||||
|
/*
|
||||||
|
cache cleaner setup
|
||||||
|
*/
|
||||||
|
Log::info("Cache cleaner init");
|
||||||
|
cleaner = new CacheCleaner();
|
||||||
|
cleaner->init();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
pause
|
pause
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user