Files
tty7/mobile/src
l0ng-ai e9d6e6641e feat(mobile): name machines as the OS does, and recognise a re-paired computer (#1097)
A phone listed two "Mac"s with nothing to tell them apart: the installed
tty7 and a dev build on the same computer, each with its own key. The one
whose key nothing answered to any more just sat on "Connecting…".

- The gateway names itself by macOS's computer name ("thomas's Mac mini")
  rather than gethostname(), which is whatever the router's DHCP handed out
  ("Mac.lan") and changes with the network. Elsewhere it is unchanged.
- Pairing codes carry an optional machine fingerprint: a SHA-256 of the
  OS's machine id (gethostuuid, /etc/machine-id, MachineGuid), so the id
  itself never leaves the machine. Every tty7 on one computer gives the
  same one; older apps ignore the field, older desktops omit it.
- The app keeps the fingerprint and the pairing time with each machine.
  Pairing a computer it already holds under another key offers to replace
  the older entry ("Keep both" for more than one tty7 on it), and machines
  that share a name show when each was paired.
2026-10-07 21:01:47 +08:00
..