Skip to content

feat(directory): interface picker for 'Direct' endpoint mode #71

Description

@geldoronie

When the user publishes to the public directory in Direct endpoint
mode (the default — announce my host directly, no tunnel), today's
code auto-discovers a public IP and offers nothing else. Real gap:

Multi-homed hosts can't choose which interface. A user with
Wi-Fi + ethernet + a VPN adapter all up has multiple legitimate
IPv4s to advertise. The current path picks one with no UI input —
sometimes the wrong one, and the user has no override short of
disabling the adapter at the OS level.

(Earlier draft also asked for a custom-URL override on Direct, but
the existing Custom endpoint mode already covers that use case
— users who run their own reverse proxy / port-forward / tunnel
just pick Custom and type the URL there.
)

What this issue covers

Extend the Direct endpoint mode block in
Configurations → Streaming → Public directory with an interface
picker:

  • Interface dropdown listing all local network interfaces
    with their IPv4 addresses, plus an explicit "Auto" option
    that mirrors today's auto-pick. Default selection = "Auto"
    so existing users see no change unless they touch the field.
  • Picking an interface flips the advertised URL to use that
    interface's IPv4 + the streaming port.
  • Persistenceconfig.json → directory.publish.directInterface
    stores either the interface name ("eth0", "wlan0", "Ethernet
    2") or the literal string "auto".

Acceptance

  • Direct mode shows an Interface dropdown defaulting to Auto.
  • Picking a non-Auto interface advertises the chosen IPv4 in the
    directory ad.
  • Auto = today's behaviour, byte-for-byte.
  • Restart of the app preserves the pick across runs.
  • If the saved interface no longer exists on a later launch (cable
    unplugged, VPN dropped), fall back to Auto silently and log a
    warning — don't fail to publish.

Out of scope

Notes

Original ask came in #68 follow-up — narrowed after user pointed out
Custom already handles the override-URL half.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions