fix: refactor everything, fix everything
This commit is contained in:
+1
-1
@@ -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
File diff suppressed because it is too large
Load Diff
+19
-18
@@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user