From b08f7a23b22439ab294f9c29303a4cd189e0396e Mon Sep 17 00:00:00 2001 From: ALI EFE CAKICI Date: Mon, 23 Mar 2026 21:56:09 +0300 Subject: [PATCH] fix: show actual bind address in Web UI log message When running multiple Sunshine instances with different bind_address values, the log message always showed 'localhost' instead of the actual IP address. This made it confusing to know which URL to use for each instance's Web UI. Now shows the configured bind_address when set, or 'localhost' as a fallback when binding to all interfaces (wildcard). Fixes #4638 --- src/confighttp.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 4a0bb128016..d415101506a 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -1739,11 +1739,15 @@ namespace confighttp { server.config.address = net::get_bind_address(address_family); server.config.port = port_https; + // Store bind address for logging, use "localhost" as fallback for wildcard addresses + const auto bind_addr = server.config.address; + const auto display_addr = config::sunshine.bind_address.empty() ? "localhost"sv : std::string_view {bind_addr}; + auto accept_and_run = [&](auto *server) { try { platf::set_thread_name("confighttp::tcp"); - server->start([](const unsigned short port) { - BOOST_LOG(info) << "Configuration UI available at [https://localhost:"sv << port << "]"; + server->start([&display_addr](const unsigned short port) { + BOOST_LOG(info) << "Configuration UI available at [https://"sv << display_addr << ":" << port << "]"; }); } catch (boost::system::system_error &err) { // It's possible the exception gets thrown after calling server->stop() from a different thread