Skip to content

feat(onboarding): list Silo servers found on the network and tailnet #460

Open

Description

@Quick104

Problem

Adding a server on an Android phone, tablet or TV starts with typing its address. On a TV that means entering an IP and port with the remote, and on a tailnet it means knowing the full *.ts.net name. The Apple apps now list the servers they can reach on the add-server screen (Silo-Server/silo-apple#591). Android has no equivalent, and a typed bare tailnet name is saved as http://<name>, which only answers reads, so network sign-in fails on it.

Server contract

Defined in docs/architecture/server-discovery.md (Silo-Server/silo-server#1846) and the Tailscale plugin (Silo-Community/silo-plugin-tailscale#3):

  • LAN: DNS-SD _silo._tcp in local., TXT v=1 and id=<server_id>. The port speaks plain HTTP. A/AAAA records cover only the listener's address families, never link-local IPv6.
  • Tailnet: http://silo/, silo-1 and silo-2 answer 307 to the node's HTTPS origin, keeping the path. A typed bare name goes through the same redirect.
  • Verification: every candidate is confirmed with GET /api/v2/system/identity. The TXT id and the redirect authorize nothing.

Work

  • Phone and TV setup screens (ServerSetupViewModel, TvServerSetupViewModel) get a found-servers list:
    • Browse _silo._tcp. with NsdManager, using registerServiceInfoCallback on API 34+. Build the URL from the resolved IP, never the .local name, with IPv6 in brackets.
    • Accept a tailnet probe only when it redirects once, to HTTPS, on the probed name plus a domain, and when the probe's connections have overlay addresses on both ends (100.64.0.0/10 or fd7a:115c:a1e0::/48). Probe again on network changes and periodically while the screen is open.
    • Confirm every candidate's identity, group results by server_id, and label them "On this network" or "Private network".
  • Typed addresses: when a probe redirects to HTTPS on an expansion of the typed host, save that origin, not the typed URL.
  • Cleartext: LAN results are plain HTTP. Selecting one goes through the existing CleartextConsentStore consent.
  • TV: found servers are one-press rows, focusable while connecting and showing progress. The TV's manual entry gains the bare-name redirect.

Validation

  • Phone, tablet and Android TV each find a LAN server and connect.
  • An advertisement whose id doesn't match its address isn't listed.
  • A tailnet node named silo is found off the LAN.
  • A renamed node is reachable by typing its short name.
  • Wi-Fi with client isolation: nothing is found, and manual entry still works.

Validation tasks: changes #336 and #337 (TV client sign-in & onboarding) manual-entry cases.

AI disclosure

AI-assisted issue drafting: claude-opus-5-5 in Claude Code through T3 Code, using GitHub CLI and the repository unslop skill. The Apple implementation in Silo-Server/silo-apple#591 is the reference; no Android code exists yet.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions