style: clang-format pass

This commit is contained in:
2026-03-20 19:05:41 -03:00
parent 3231638ce7
commit 2553f5ab4b
4 changed files with 22 additions and 19 deletions
+16 -15
View File
@@ -5,22 +5,23 @@
#include <mutex>
#include <openssl/ssl.h>
class CertManager {
public:
CertManager();
~CertManager();
class CertManager
{
public:
CertManager();
~CertManager();
bool Init();
SSL_CTX* CreateHostContext(const std::string& host);
bool Init();
SSL_CTX* CreateHostContext(const std::string& host);
private:
bool GenerateCA();
bool LoadCA();
private:
bool GenerateCA();
bool LoadCA();
EVP_PKEY* _caPkey = nullptr;
X509* _caCert = nullptr;
EVP_PKEY* _sessionPkey = nullptr;
std::mutex _mutex;
std::unordered_map<std::string, SSL_CTX*> _hostContexts;
EVP_PKEY* _caPkey = nullptr;
X509* _caCert = nullptr;
EVP_PKEY* _sessionPkey = nullptr;
std::mutex _mutex;
std::unordered_map<std::string, SSL_CTX*> _hostContexts;
};
+4 -2
View File
@@ -399,7 +399,8 @@ int main()
{
std::string objStr = currentItems.substr(objStart, objEnd - objStart + 1);
if (std::regex_search(objStr, qtyRegex))
objStr = std::regex_replace(objStr, qtyRegex, "\"quantity\":" + std::to_string(qty));
objStr =
std::regex_replace(objStr, qtyRegex, "\"quantity\":" + std::to_string(qty));
else
objStr.insert(objStr.length() - 1, ",\"quantity\":" + std::to_string(qty));
@@ -419,7 +420,8 @@ int main()
if (seenIds.find(id) == seenIds.end())
{
if (!currentItems.empty() && currentItems.back() != ',') currentItems += ",";
currentItems += "{\"itemId\":\"" + id + "\",\"quantity\":" + std::to_string(qty) + "}";
currentItems +=
"{\"itemId\":\"" + id + "\",\"quantity\":" + std::to_string(qty) + "}";
seenIds.insert(id);
}
}
+1 -1
View File
@@ -549,4 +549,4 @@ void Proxy::handleClient(SOCKET hClientSocket)
if (connectionClosed) break;
}
}
}
}
+1 -1
View File
@@ -12,7 +12,7 @@
TO-DO:
use random port, test availability
*/
#define PROXY_PORT 58421
#define PROXY_PORT 58421
typedef unsigned __int64 SOCKET;