Skip to content

feat: remember an approved phone and laptop across sessions - #47

Merged
kvm404 merged 3 commits into
mainfrom
feat/trusted-pairing
Aug 18, 2026
Merged

kvm404 merged 3 commits into
mainfrom
feat/trusted-pairing

Conversation

@kvm404

@kvm404 kvm404 commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Drop the 15 fps Home toggle from v0.2 (user: not needed).
  • Persist a pairing_secret on laptop (~/.config/phonecam/trusted.json) and phone so the next session can tap Reconnect instead of scanning a QR.
  • ApproveTrusted + POST /reconnect with pairing_secret. phonecam trust list|revoke. --no-trust for CI/demo.

Why

v0.2 persistent trusted pairing. In-session reconnect (#46) still required a QR after phonecam stop / new start.

Testing

  • Unit tests
  • Manual CLI verification
  • Manual Android verification

Evidence: go test ./... + -race; Android testDebugUnitTest (121 tests). Review closed two secret-rotation/delivery bugs.

Privacy/Security Impact

  • Pairing/authentication
  • Stored configuration
  • Local network transport

Secrets never in QR, GET /pairing, session.json, or GET /trust. Store is 0700/0600. /trust is loopback-only. Secret is as visible on the wire (once, over HTTP) as unencrypted RTP. Forget-on-phone is local only; phonecam trust revoke bars the phone. No unused expiry (explicit revoke only). Protocol v stays 1.

Notes

Draft. Does not add 15 fps, torch, USB, or mDNS. Please test: pair once, phonecam stop && start, tap Reconnect on the phone.

kvm404 added 3 commits August 18, 2026 09:09
Bitrate-per-preset already shipped. The 15 fps Home toggle is Later
(unscheduled), not v0.3. PR 9 is cancelled (user decision 2026-08-18).
Persist pairing_secret in trusted.json and on the phone so the next
phonecam start can ApproveTrusted from Home Reconnect without a new QR.
Secrets stay off the QR, GET /pairing, session.json, GET /trust, and
start output. --no-trust skips the store for that process.
… laptop

Do not rotate pairing_secret when Approve is a no-op. Attach the secret
before the session flips approved so require-approval /status can deliver it.
@kvm404
kvm404 marked this pull request as ready for review August 18, 2026 10:46
@kvm404
kvm404 merged commit 5a46122 into main Aug 18, 2026
2 checks passed
@kvm404
kvm404 deleted the feat/trusted-pairing branch August 18, 2026 10:46
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.

1 participant