Skip to content

Pair with IP: pair two desktops by typing an address and a 12-character code #2079

Done

Description

@TheAnimatrix

Two Mousse desktops on the same network or tailnet can only pair by moving a ticket (QR code, link, sent link) or over SSH. Pair with IP adds one more way: the host shows 192.168.1.20:47100 and a code like K7QM-2XPA-9RTE, the joiner types both, and the host owner taps Allow.

Design: mousse-net docs/pair-with-ip-design.md (mousse-agent/mousse-net#31). Part of #1510.

Rules

  1. Only the address, the port and the code pass from the host's screen to the joiner.
  2. A joiner that reached the wrong endpoint, or one that does not know the code, pins nothing and is granted nothing; that endpoint cannot test codes offline.
  3. Guessing is online only: 5 tries at the host per invitation, 5 at the joiner per typed lookup in 24 h, whatever key the far end shows.
  4. The code is bound to the TLS session and both identity keys.
  5. An invitation is used at most once, expires after 10 minutes (plus a 5-minute window to tap Allow), and ends on cancel and on host restart.
  6. Enrollment happens only on a connection of the device that passed the code; a joiner's cancel always wins over a crossing Allow.
  7. Kinds 1 and 2, ticket version 1 and their vectors are unchanged; the app offers Pair with IP only when its helper lists pair-with-ip.
  8. mousse-net-core does no I/O and builds for wasm32; every new limit is a clamped MOUSSE_NET_* setting.
  9. The code is never logged, and is zeroized in the engine and the helper.
  10. A paired device cut off by wire minor 4 shows Needs update, stays disabled with the way to update it, and clears by itself once updated. No build speaks minor 4 before the release that carries those rows.

Slices

  • 0a. Version refusals reported (mousse-net; depends on nothing). The helper records each paired identity's last refusal for version in its own store, reports unsupported_version {peer_minor} on dials and peer.incompatible for refused callers with a grant or pin, and the keeper keeps probing such a host. Files: mousse-net-io conn and host, mousse-helper app/paths.rs and a new store. Verify: cargo test -p mousse-helper with MOUSSE_NET_TEST_HELLO_MINOR.
  • 0b. Needs update rows (mousse; depends on 0a pinned in the app). Needs update replaces "incompatible version" for engine rows, disabled with the update way, "Check again", one notice. Files: src/renderer/lib/netDevices.ts, computerUpdate.ts, EngineDevicesSection.tsx, NetEngineService.ts. Verify: node scripts/verify.mjs tests/renderer/engineDevicesSection.test.ts plus the netDevices tests.
  • 1. Direct code (mousse-net core; depends on nothing). direct_code.rs: draws, entry rules, lookup and secret; direct-code.json vectors; second implementation. Verify: cargo test -p mousse-net-core direct_code, wasm check, npm test in interop/second-impl-ts.
  • 2. Wire messages and gate (core; after 1). JOIN_DIRECT, AUTHORIZED keys 2 and 3, the pairing-only caller state, a debug-only way to speak minor 4; spec §2, 8, 11. Verify: core tests and control.json.
  • 3. Binding and host machine (core; after 2). D, CI, PRS for kind 3 and the CPace run; DirectHostPairing with requests per identity, the Allow window, cancel and recovery answers; spec 10.9; pairing-attempts.json kind-3 cases.
  • 4. Joiner machine (core; after 3). DirectJoinerPairing, the ledger and pending records; pairing-e2e.json kind-3 cases; second implementation replays them.
  • 5. io (after 4). connect_unpinned, own listener kind for relay circuits, the 1 s miss hold, DirectRecords, host and caller drivers. Verify: cargo test -p mousse-net-io.
  • 6. Helper and CLI (after 5). invite.create {kind: "direct"}, join.direct, approval requests per identity, completions by invitation id, CLI, sim drills, must-fail controls. Feature not listed yet. Verify: cargo test -p mousse-helper --test app_pair_ip, mousse-check must-fail.
  • 7. App tabs (mousse; after 6 pinned and feat(devices): pairing dialogs pick the method from tabs and the way from a menu #2039 merged). Pair with IP in both dialogs behind pair-with-ip. Verify: node scripts/verify.mjs tests/netEngine/pairing.test.ts and the dialog tests; screenshots.
  • 8. Minor 4. Turn Pair with IP on: wire minor 4, and the helper lists pair-with-ip and pair-with-ip-names mousse-net#65 enables Pair with IP. feat(net): enable pairing by computer name or IP #2540 bundles that helper. Windows and macOS paired by LAN IP, Tailscale IP and a Tailscale DNS name. Each connection waited for the host to tap Allow.

Open branches touching the same app files: #2039 (pairing dialogs), devices-pairing-ux, devices-list-detail; 0b and 7 rebase on whatever lands first.

Activity

  1. TheAnimatrix commented on Nov 27, 2026

    @TheAnimatrix
    CollaboratorAuthor

    WIP: slices 0a and 1 started in mousse-net (version refusals reported; direct code type and vectors).

  2. TheAnimatrix commented on Nov 28, 2026

    @TheAnimatrix
    CollaboratorAuthor

    Slices 0a (mousse-agent/mousse-net#32) and 1 (mousse-agent/mousse-net#33) merged. WIP: slice 0b (Needs update rows in the app) and slice 2 (wire messages).

  3. TheAnimatrix commented on Nov 28, 2026

    @TheAnimatrix
    CollaboratorAuthor

    WIP: slice 7 (app tabs for Pair with IP) is in progress on branch pair-ip-tabs, stacked on #2039.

  4. TheAnimatrix commented on Nov 29, 2026

    @TheAnimatrix
    CollaboratorAuthor

    Slices 0a–7 are merged (mousse-net #42, #43, #44; mousse #2039, #2162). Pair with IP stays hidden until a helper speaks wire minor 4. Slice 8 (raise the minor and list pair-with-ip) waits for the first release that carries the Needs update rows from #2125; then a hand check on two computers over LAN and Tailscale.

  5. TheAnimatrix commented on Nov 30, 2026

    @TheAnimatrix
    CollaboratorAuthor

    WIP: the pairing rework's first app PR is open as #2451 (code-free Link with Show QR in Let a device in, More options in Use another computer, and invitations that stay open in Settings → Devices → Active invites). Hostname entry for Pair with IP follows in a later PR.

  6. TheAnimatrix commented on Nov 30, 2026

    @TheAnimatrix
    CollaboratorAuthor

    WIP: #2506 adds computer names to Pair with IP (host shows its name, joiner takes a name or IP), gated on networking's pair-with-ip-names.

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