config: move async_proxy out of experimental and enable

tested for hours on my git forge, lgtm
This commit is contained in:
Vaxry
2025-04-15 23:32:56 +01:00
parent 3bfbe3598b
commit 01998444c0
3 changed files with 15 additions and 21 deletions

View File

@@ -40,11 +40,8 @@
}
],
// experimental settings. Use with caution!
"experimental": {
// If enabled, all requests to the proxy will create their own thread.
// this can increase the throughput of the proxy, especially when there are a lot of requests made
// all at once.
"async_proxy": false
}
// If enabled, all requests to the proxy will create their own thread.
// this can increase the throughput of the proxy, especially when there are a lot of requests made
// all at once.
"async_proxy": true
}

View File

@@ -35,20 +35,17 @@ class CConfig {
};
struct SConfig {
int port = 3001;
std::string forward_address = "127.0.0.1:3000";
std::string data_dir = "";
std::string html_dir = "";
unsigned long int max_request_size = 10000000; // 10MB
bool git_host = false;
unsigned long int proxy_timeout_sec = 120; // 2 minutes
bool trace_logging = false;
std::vector<SIPRangeConfig> ip_configs;
int port = 3001;
std::string forward_address = "127.0.0.1:3000";
std::string data_dir = "";
std::string html_dir = "";
unsigned long int max_request_size = 10000000; // 10MB
bool git_host = false;
unsigned long int proxy_timeout_sec = 120; // 2 minutes
bool trace_logging = false;
std::vector<SIPRangeConfig> ip_configs = {};
int default_challenge_difficulty = 4;
struct {
bool async_proxy = false;
} experimental;
bool async_proxy = true;
} m_config;
struct {

View File

@@ -360,7 +360,7 @@ void CServerHandler::serveStop(const Pistache::Http::Request& req, Pistache::Htt
}
void CServerHandler::proxyPass(const Pistache::Http::Request& req, Pistache::Http::ResponseWriter& response) {
if (g_pConfig->m_config.experimental.async_proxy) {
if (g_pConfig->m_config.async_proxy) {
proxyPassAsync(req, response);
return;
}