Skip to content

Add general.address / --address to bind the RTSP listener to a specific local IP - #2275

Merged
mikebrady merged 2 commits into
mikebrady:developmentfrom
haavar:poc/listen-address
Sep 10, 2026
Merged

mikebrady merged 2 commits into
mikebrady:developmentfrom
haavar:poc/listen-address

Conversation

@haavar

@haavar haavar commented Sep 3, 2026

Copy link
Copy Markdown

rtsp_listen_loop() passes NULL as the getaddrinfo node, so the RTSP listener
always binds the wildcard address (all local addresses); general.interface only
scopes the mDNS advertisement.

This adds an optional general.address (and matching --address), passed as the
bind node instead:

  • unset -> unchanged all-addresses (wildcard) bind
  • an IP -> the listener binds that address only

CLI overrides config, mirroring general.port / -p. The advertisement scope
(general.interface) is intentionally left separate: --address restricts the
socket, interface the advertisement.

Motivation and the broader multi-instance discussion are in #2266. Tested with
classic and AirPlay 2 builds, including end-to-end playback.

… local IP

rtsp_listen_loop() passed NULL as the getaddrinfo node, always binding the
listening (RTSP) socket to the wildcard address (all interfaces). Add an
optional local address, settable via the general.address config key and a
--address CLI flag (CLI overrides config, mirroring general.port / -p), and
pass it as the getaddrinfo node. NULL preserves the existing all-addresses
behaviour; an IP literal yields a single-address bind.

The mDNS advertisement scope (general.interface) is intentionally left
separate: --address restricts the socket, general.interface the advertisement.
@mikebrady
mikebrady merged commit 56c9cc9 into mikebrady:development Sep 10, 2026
1 check passed
@mikebrady

Copy link
Copy Markdown
Owner

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants