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