diff --git a/PAM/ssh/include/rublon/websockets.hpp b/PAM/ssh/include/rublon/websockets.hpp index 7e9a051..d8976a1 100644 --- a/PAM/ssh/include/rublon/websockets.hpp +++ b/PAM/ssh/include/rublon/websockets.hpp @@ -87,7 +87,7 @@ class WebSocket { log(LogLevel::Debug, "WebSocket using proxy"); // "username:password\@server:port" - proxyUrl.reserve(conservative_estimate(cfg.proxyUsername, cfg.proxyPass, cfg.proxyHost, cfg.proxyPort) + 10); + proxyUrl.reserve(conservative_estimate(cfg.proxyUsername, cfg.proxyPass, cfg.proxyHost) + 10); if(cfg.proxyAuthRequired) { proxyUrl += *cfg.proxyUsername; proxyUrl += ":"; @@ -96,15 +96,7 @@ class WebSocket { } proxyUrl += *cfg.proxyHost; - if(cfg.proxyPort.value_or(0) > 0) { - proxyUrl += ":"; - proxyUrl += std::to_string(*cfg.proxyPort); - } - - // Set environment variable for libwebsockets to pick up - log(LogLevel::Debug, "WebSocket proxy %s", proxyUrl.c_str()); - info.http_proxy_address = proxyUrl.c_str(); info.http_proxy_port = config.proxyPort.value_or(8080); }