fix: refactor everything, fix everything

This commit is contained in:
2026-03-20 15:19:19 -03:00
parent 74e3087295
commit 013755bd15
3 changed files with 473 additions and 505 deletions
+19 -18
View File
@@ -12,28 +12,29 @@
typedef unsigned __int64 SOCKET;
class Proxy {
public:
Proxy();
~Proxy();
class Proxy
{
public:
Proxy();
~Proxy();
bool Init();
void Shutdown();
bool Init();
void Shutdown();
CallbackEvent<const std::string&, std::string&> OnClientRequest;
CallbackEvent<const std::string&, std::string&> OnServerResponse;
CallbackEvent<const std::string&, std::string&> OnClientRequest;
CallbackEvent<const std::string&, std::string&> OnServerResponse;
private:
void loop();
void handleClient(SOCKET clientSocket);
private:
void loop();
void handleClient(SOCKET clientSocket);
bool initSSL();
void cleanupSSL();
bool initSSL();
void cleanupSSL();
SOCKET _listenSocket = 0;
std::thread _workerThread;
std::atomic<bool> _running;
SOCKET _listenSocket = 0;
std::thread _workerThread;
std::atomic<bool> _running = false;
CertManager _certManager;
SSL_CTX* _clientCtx = nullptr;
CertManager _certManager;
SSL_CTX* _clientCtx = nullptr;
};