From 743ff5e0617834563f1c69a6da25f80faac510fa Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sat, 21 Feb 2026 11:17:26 +0100 Subject: [PATCH] Add streamingoauth.bose.com to the intercepted DNS records --- pkg/discovery/dns.go | 1 + pkg/discovery/dns_test.go | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/pkg/discovery/dns.go b/pkg/discovery/dns.go index a423cc0..18e97e3 100644 --- a/pkg/discovery/dns.go +++ b/pkg/discovery/dns.go @@ -155,6 +155,7 @@ func (d *DNSDiscovery) shouldIntercept(hostname string) bool { "marge.bose.com", "bmx.bose.com", "streaming.bose.com", + "streamingoauth.bose.com", "updates.bose.com", "stats.bose.com", "content.api.bose.io", diff --git a/pkg/discovery/dns_test.go b/pkg/discovery/dns_test.go index 92f8e3a..71fcbb7 100644 --- a/pkg/discovery/dns_test.go +++ b/pkg/discovery/dns_test.go @@ -38,6 +38,24 @@ func TestDNSDiscovery_Interception(t *testing.T) { t.Errorf("Expected A record, got %T", rw.msg.Answer[0]) } + // Test intercepting streamingoauth.bose.com + m3 := new(dns.Msg) + m3.SetQuestion("streamingoauth.bose.com.", dns.TypeA) + rw3 := &mockResponseWriter{} + d.ServeDNS(rw3, m3) + + if rw3.msg == nil || len(rw3.msg.Answer) == 0 { + t.Fatal("Expected response for streamingoauth.bose.com") + } + + if a, ok := rw3.msg.Answer[0].(*dns.A); ok { + if a.A.String() != serviceIP { + t.Errorf("Expected intercepted IP %s for streamingoauth.bose.com, got %s", serviceIP, a.A.String()) + } + } else { + t.Errorf("Expected A record for streamingoauth.bose.com, got %T", rw3.msg.Answer[0]) + } + // Test aftertouch.test m2 := new(dns.Msg) m2.SetQuestion("aftertouch.test.", dns.TypeA)