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
+1 -1
View File
@@ -86,7 +86,7 @@ add_custom_command(TARGET dbd-unlocker POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different COMMAND ${CMAKE_COMMAND} -E copy_if_different
${JSON_RES_FILES} ${JSON_RES_FILES}
"$<TARGET_FILE_DIR:dbd-unlocker>/" "$<TARGET_FILE_DIR:dbd-unlocker>/"
COMMENT "Copying JSON resources to executable directory" COMMENT "copying json sources"
) )
# ------------------------------ # ------------------------------
+453 -486
View File
File diff suppressed because it is too large Load Diff
+19 -18
View File
@@ -12,28 +12,29 @@
typedef unsigned __int64 SOCKET; typedef unsigned __int64 SOCKET;
class Proxy { class Proxy
public: {
Proxy(); public:
~Proxy(); Proxy();
~Proxy();
bool Init(); bool Init();
void Shutdown(); void Shutdown();
CallbackEvent<const std::string&, std::string&> OnClientRequest; CallbackEvent<const std::string&, std::string&> OnClientRequest;
CallbackEvent<const std::string&, std::string&> OnServerResponse; CallbackEvent<const std::string&, std::string&> OnServerResponse;
private: private:
void loop(); void loop();
void handleClient(SOCKET clientSocket); void handleClient(SOCKET clientSocket);
bool initSSL(); bool initSSL();
void cleanupSSL(); void cleanupSSL();
SOCKET _listenSocket = 0; SOCKET _listenSocket = 0;
std::thread _workerThread; std::thread _workerThread;
std::atomic<bool> _running; std::atomic<bool> _running = false;
CertManager _certManager; CertManager _certManager;
SSL_CTX* _clientCtx = nullptr; SSL_CTX* _clientCtx = nullptr;
}; };