mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
#337's first commit added the OAuth-derivation to the DNS interceptor but missed the served TLS certificate. With a serverURL of `http://mac.fritz.box:8000` the cert SAN list covered `mac.fritz.box` but not `macoauth.fritz.box`, so the speaker would resolve the OAuth host correctly (via the new DNS hijack) and then immediately fail the TLS handshake — Spotify / Amazon Music token refresh dies before reaching AfterTouch. getDomains now calls discovery.DeriveOAuthHostnames(serverURL) and discovery.DeriveOAuthHostnames(httpsServerURL), feeding the derived names into the SAN map alongside the existing entries. IP-based serverURLs continue to produce no derivation (the OAuth construction is unrecoverable for them — see the existing oauth_target_reachable health check). Tests in cmd/soundtouch-service/main_test.go lock in: - Hostname serverURL → derived OAuth variant present in SAN list. - IP serverURL → no malformed `192oauth.…` entry leaks in. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>