feat: instantiate and delete proxy, add win+c handler
This commit is contained in:
@@ -1,4 +1,29 @@
|
|||||||
|
#include "proxy.h"
|
||||||
|
|
||||||
|
#include <nerutils/log.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
Log::createConsole();
|
||||||
|
SetConsoleCtrlHandler(consoleHandler, TRUE);
|
||||||
|
|
||||||
|
Log::info("Unlocker init");
|
||||||
|
|
||||||
|
|
||||||
|
Log::verbose("Starting proxy");
|
||||||
|
Proxy* proxy = new Proxy();
|
||||||
|
if (!proxy->Init())
|
||||||
|
{
|
||||||
|
Log::error("Proxy failed to start");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::verbose("Proxy running (CTRL+C to stop)");
|
||||||
|
while (running)
|
||||||
|
Sleep(100);
|
||||||
|
|
||||||
|
Log::verbose("Shutting down proxy");
|
||||||
|
proxy->Shutdown();
|
||||||
|
delete proxy;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user