WebFramework v3.0.12
Web framework for C++.
Loading...
Searching...
No Matches
ProxyServer.h
1#pragma once
2
3#include "Import/WebFrameworkCore.h"
4
5#include "WebNetwork/WebServers/BaseWebServer.h"
6#include "Utility/BaseConnectionData.h"
7
8namespace framework
9{
10 namespace proxy
11 {
13 {
14 private:
15 struct ProxyData : public utility::BaseConnectionData
16 {
17 public:
18 bool isHTTPS;
19
20 public:
21 ProxyData(std::string_view ip, std::string_view port, DWORD timeout, bool useHTTPS);
22
23 ~ProxyData() = default;
24 };
25
26 private:
27 std::unordered_map<std::string, const ProxyData*> routes;
28 std::vector<ProxyData> proxyData;
29
30 private:
31 void clientConnection(const std::string& ip, SOCKET clientSocket, sockaddr addr, std::function<void()>& cleanup) override;
32
33 public:
34 ProxyServer(std::string_view ip, std::string_view port, DWORD timeout, const json::utility::jsonObject& proxySettings);
35
36 ~ProxyServer() = default;
37 };
38 }
39}
Contains all data for connection to server.