Add streamingoauth.bose.com to the intercepted DNS records

This commit is contained in:
Tobias Gesellchen
2026-02-21 11:22:46 +01:00
parent ec8bbb2f86
commit 743ff5e061
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -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",
+18
View File
@@ -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)