mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
On a multi-homed host the discovery layer used to walk net.Interfaces()
and pick the first non-loopback IPv4 NIC, while UPnP/SSDP bound a
wildcard UDP socket and let the kernel route the multicast send. That
meant --bind on soundtouch-web only moved the HTTP listener; the
discovery still went out whatever interface the kernel preferred (often
the wrong one on hosts where the speakers sit behind a secondary NIC).
Introduce a separate DiscoveryInterface knob:
* pkg/config: DiscoveryInterface field + DISCOVERY_INTERFACE env var.
* pkg/discovery/mdns: NewMDNSDiscoveryServiceWithInterface; the
interface resolver now honours an explicit name and validates it
has a usable IPv4 address before handing it to hashicorp/mdns.
* pkg/discovery/upnp: when an interface is configured, bind the UDP
socket's source IP to the NIC's IPv4 and call
ipv4.PacketConn.SetMulticastInterface so M-SEARCH leaves the right
NIC. Without an interface, behaviour is unchanged.
* cmd/soundtouch-web: new --interface flag (DISCOVERY_INTERFACE env)
plumbed into the config before the discovery service is built.
go.mod/go.sum reflect promoting golang.org/x/net from indirect to a
direct dependency (now imported for ipv4.PacketConn).
Refs #264.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
1.3 KiB
AMPL
38 lines
1.3 KiB
AMPL
module github.com/gesellix/bose-soundtouch
|
|
|
|
go 1.26.3
|
|
|
|
require (
|
|
github.com/chromedp/chromedp v0.15.1
|
|
github.com/go-chi/chi/v5 v5.2.5
|
|
github.com/google/gopacket v1.1.19
|
|
github.com/gorilla/websocket v1.5.3
|
|
github.com/hashicorp/mdns v1.0.6
|
|
github.com/miekg/dns v1.1.72
|
|
github.com/russross/blackfriday/v2 v2.1.0
|
|
github.com/sergi/go-diff v1.4.0
|
|
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
|
|
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
|
|
github.com/urfave/cli/v2 v2.27.7
|
|
golang.org/x/crypto v0.51.0
|
|
golang.org/x/net v0.54.0
|
|
golang.org/x/term v0.43.0
|
|
)
|
|
|
|
require (
|
|
github.com/chromedp/cdproto v0.0.0-20260427013145-5737772c319b // indirect
|
|
github.com/chromedp/sysutil v1.1.0 // indirect
|
|
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
|
|
github.com/go-json-experiment/json v0.0.0-20260505212615-e40f80bf6836 // indirect
|
|
github.com/gobwas/httphead v0.1.0 // indirect
|
|
github.com/gobwas/pool v0.2.1 // indirect
|
|
github.com/gobwas/ws v1.4.0 // indirect
|
|
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
|
|
golang.org/x/image v0.40.0 // indirect
|
|
golang.org/x/mod v0.36.0 // indirect
|
|
golang.org/x/sync v0.20.0 // indirect
|
|
golang.org/x/sys v0.44.0 // indirect
|
|
golang.org/x/text v0.37.0 // indirect
|
|
golang.org/x/tools v0.45.0 // indirect
|
|
)
|