Publish HTTPS port via mdns

This commit is contained in:
badaix 2025-01-07 14:31:12 +01:00
parent 2937bffaa5
commit 59bff3e4f9
2 changed files with 9 additions and 4 deletions

View file

@ -85,13 +85,13 @@
#port = 1780 #port = 1780
# enable HTTPS Json RPC (HTTPS POST and ssl websockets) # enable HTTPS Json RPC (HTTPS POST and ssl websockets)
# ssl_enabled = false #ssl_enabled = false
# same as 'bind_to_address' but for SSL # same as 'bind_to_address' but for SSL
# ssl_bind_to_address = :: #ssl_bind_to_address = ::
# same as 'port' but for SSL # same as 'port' but for SSL
# ssl_port = 1788 #ssl_port = 1788
# serve a website from the doc_root location # serve a website from the doc_root location
# disabled if commented or empty # disabled if commented or empty

View file

@ -354,9 +354,14 @@ int main(int argc, char* argv[])
{ {
dns_services.emplace_back("_snapcast-http._tcp", settings.http.port); dns_services.emplace_back("_snapcast-http._tcp", settings.http.port);
} }
if (settings.http.ssl_enabled)
{
dns_services.emplace_back("_snapcast-https._tcp", settings.http.ssl_port);
}
publishZeroConfg->publish(dns_services); publishZeroConfg->publish(dns_services);
#endif #endif
if (settings.http.enabled) if (settings.http.enabled || settings.http.ssl_enabled)
{ {
if ((settings.http.host == "<hostname>") || settings.http.host.empty()) if ((settings.http.host == "<hostname>") || settings.http.host.empty())
{ {