Loading src/config/BootstrapConfig.cpp +2 −0 Changes for src/config/BootstrapConfig.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ const std::set<std::string> &knownLeafPatterns() { "/proxyplus/process/upstream_pool_idle_timeout_seconds", "/proxyplus/process/upstream_request_timeout_seconds", "/proxyplus/process/h2_dispatch_queue_max", "/proxyplus/process/h1_dispatch_queue_max", "/proxyplus/process/max_request_body_mb", "/proxyplus/pid_file", "/proxyplus/recovery_mode", "/proxyplus/maintenance_mode", Loading src/http/HttpProxyServer.cpp +22 −7 Changes for src/http/HttpProxyServer.cpp: 22 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -121,7 +121,8 @@ HttpProxyController::HttpProxyController(std::vector<netplus::socket *> serverSo int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) // H2 dispatch now runs through the same offload pool as H1 (see shouldOffloadH2Dispatch // below): both RequestEvent calls do real backend I/O, so both need off the shared // epoll/kqueue listener workers to avoid one bursty connection starving new TLS Loading @@ -148,13 +149,22 @@ HttpProxyController::HttpProxyController(std::vector<netplus::socket *> serverSo , _acmeChallenges(acmeChallenges) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { } bool HttpProxyController::shouldOffloadH2Dispatch(libhttppp::HttpRequest &, uint32_t) const { return true; } void HttpProxyController::CreateConnection(std::shared_ptr<netplus::con> &res) { libhttppp::HttpEvent::CreateConnection(res); if (_maxRequestBodyMb > 0) { static_cast<libhttppp::HttpRequest &>(*res).setMaxUploadSize( static_cast<size_t>(_maxRequestBodyMb) * 1024 * 1024); } } bool HttpProxyController::tryServeAcmeChallenge(libhttppp::HttpRequest &curreq, const std::string &url) { static const std::string kPrefix = "/.well-known/acme-challenge/"; Loading Loading @@ -975,7 +985,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, std::string ce int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) : _listener(listener) , _tlsActive(!listener.tlsProfile.empty()) , _httpd(std::make_unique<libhttppp::HttpD>(listener.address, listener.port, 512, certPath, Loading @@ -989,7 +1000,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, std::string ce , _idleTimeoutSeconds(idleTimeoutSeconds) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { bindAndListen(); } Loading @@ -1002,7 +1014,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) : _listener(listener) , _tlsActive(true) , _httpd(std::make_unique<libhttppp::HttpD>(listener.address, listener.port, 512, certsByHostname)) Loading @@ -1015,7 +1028,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, , _idleTimeoutSeconds(idleTimeoutSeconds) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { bindAndListen(); } Loading @@ -1036,7 +1050,8 @@ void HttpProxyServer::run() { _tlsActive, _configStore, _authService, _pluginManager, _loadBalancer, _connectionPool, _acmeChallenges, _idleTimeoutSeconds, _upstreamTimeoutSeconds, _h2DispatchQueueMax, _h1DispatchQueueMax); _h2DispatchQueueMax, _h1DispatchQueueMax, _maxRequestBodyMb); controller.runEventloop(); } Loading Loading
src/config/BootstrapConfig.cpp +2 −0 Changes for src/config/BootstrapConfig.cpp: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ const std::set<std::string> &knownLeafPatterns() { "/proxyplus/process/upstream_pool_idle_timeout_seconds", "/proxyplus/process/upstream_request_timeout_seconds", "/proxyplus/process/h2_dispatch_queue_max", "/proxyplus/process/h1_dispatch_queue_max", "/proxyplus/process/max_request_body_mb", "/proxyplus/pid_file", "/proxyplus/recovery_mode", "/proxyplus/maintenance_mode", Loading
src/http/HttpProxyServer.cpp +22 −7 Changes for src/http/HttpProxyServer.cpp: 22 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -121,7 +121,8 @@ HttpProxyController::HttpProxyController(std::vector<netplus::socket *> serverSo int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) // H2 dispatch now runs through the same offload pool as H1 (see shouldOffloadH2Dispatch // below): both RequestEvent calls do real backend I/O, so both need off the shared // epoll/kqueue listener workers to avoid one bursty connection starving new TLS Loading @@ -148,13 +149,22 @@ HttpProxyController::HttpProxyController(std::vector<netplus::socket *> serverSo , _acmeChallenges(acmeChallenges) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { } bool HttpProxyController::shouldOffloadH2Dispatch(libhttppp::HttpRequest &, uint32_t) const { return true; } void HttpProxyController::CreateConnection(std::shared_ptr<netplus::con> &res) { libhttppp::HttpEvent::CreateConnection(res); if (_maxRequestBodyMb > 0) { static_cast<libhttppp::HttpRequest &>(*res).setMaxUploadSize( static_cast<size_t>(_maxRequestBodyMb) * 1024 * 1024); } } bool HttpProxyController::tryServeAcmeChallenge(libhttppp::HttpRequest &curreq, const std::string &url) { static const std::string kPrefix = "/.well-known/acme-challenge/"; Loading Loading @@ -975,7 +985,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, std::string ce int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) : _listener(listener) , _tlsActive(!listener.tlsProfile.empty()) , _httpd(std::make_unique<libhttppp::HttpD>(listener.address, listener.port, 512, certPath, Loading @@ -989,7 +1000,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, std::string ce , _idleTimeoutSeconds(idleTimeoutSeconds) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { bindAndListen(); } Loading @@ -1002,7 +1014,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, int idleTimeoutSeconds, int upstreamTimeoutSeconds, int h2DispatchQueueMax, int h1DispatchQueueMax) int h1DispatchQueueMax, int maxRequestBodyMb) : _listener(listener) , _tlsActive(true) , _httpd(std::make_unique<libhttppp::HttpD>(listener.address, listener.port, 512, certsByHostname)) Loading @@ -1015,7 +1028,8 @@ HttpProxyServer::HttpProxyServer(config::ListenerConfig listener, , _idleTimeoutSeconds(idleTimeoutSeconds) , _upstreamTimeoutSeconds(upstreamTimeoutSeconds) , _h2DispatchQueueMax(h2DispatchQueueMax) , _h1DispatchQueueMax(h1DispatchQueueMax) { , _h1DispatchQueueMax(h1DispatchQueueMax) , _maxRequestBodyMb(maxRequestBodyMb) { bindAndListen(); } Loading @@ -1036,7 +1050,8 @@ void HttpProxyServer::run() { _tlsActive, _configStore, _authService, _pluginManager, _loadBalancer, _connectionPool, _acmeChallenges, _idleTimeoutSeconds, _upstreamTimeoutSeconds, _h2DispatchQueueMax, _h1DispatchQueueMax); _h2DispatchQueueMax, _h1DispatchQueueMax, _maxRequestBodyMb); controller.runEventloop(); } Loading