Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

Tailscale app: honest VPN status, timers, conflict warning, Remote Into a Mac - #59

Merged
techmore merged 1 commit into
mainfrom
claude/tailscale-vpn-status
Oct 29, 2026
Merged

techmore merged 1 commit into
mainfrom
claude/tailscale-vpn-status

Conversation

@techmore

Copy link
Copy Markdown
Owner

Owner feedback: no reliable status, wants a timer like other VPN apps, and needs to reach the Mac mini. This morning WiFiman's own WireGuard tunnel (utun) knocked BFS off while NetworkManager still said BFS was "activated".

  • Honest status: a VPN shows Connected only when its tunnel interface is up. The app finds it by the VPN's own address (BFS → ppp0) or by device (WireGuard). Otherwise: Connecting… (spinner), "Dropped: on, but not carrying any traffic", or "Failed: ". The reason comes from recent NetworkManager/pppd/IPsec log lines, or names the other app that took over. Dropped and Failed get a Reconnect button. "Internet traffic now goes through …" uses ip route get 1.1.1.1, so policy routing (WireGuard's table 51820) is included. Refreshes every 3 s and on network changes.
  • Timer + traffic: h:mm:ss and ↓/↑ bytes for each connected VPN, updated every second from sysfs. Tailscale shows "Connected for …". Start times are kept across app restarts (sessions.json, keyed by tunnel ifindex, so a reconnect resets the timer).
  • Conflict banner: "WiFiman (utun) started its own VPN; it knocked BFS off. Use one VPN at a time." or "BFS and WiFiman (utun) are both on…".
  • Remote Into a Mac: csp-bfs-mini first, plus other online Macs. Screen Sharing opens remmina -c vnc://<tailscale-ip>, with Copy ssh. Offers Turn On Tailscale when it's stopped, and the Remmina install command when it's missing (it isn't installed on the laptop yet).
  • The WireGuard gear opens nm-connection-editor (the sheet is for plugin VPNs).

Checked: 8 unit tests (nmcli active parsing, failure reasons, address→tunnel mapping), clippy clean. Fixture renders of the healthy and conflict scenarios are in the README. A render against the real machine shows BFS and WiFiman both up, traffic through utun, the banner, and Tailscale off. Installed and restarted by PID.

🤖 Generated with Claude Code

…to a Mac

- A VPN is Connected only when its tunnel interface is up (found by the
  VPN's own address), else Connecting, Dropped or Failed with a reason from
  NetworkManager/pppd/IPsec logs, plus Reconnect. Shows which interface
  really carries internet traffic (ip route get).
- Session timer and bytes down/up for each connected VPN and Tailscale,
  kept across app restarts, reset on reconnect.
- Banner when another tunnel (WiFiman's utun etc.) is up next to a VPN or
  knocked it off.
- Remote Into a Mac: the BFS Mac mini and online Macs with Screen Sharing
  (Remmina vnc://) and Copy ssh; Turn On Tailscale when it is off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@techmore
techmore merged commit dc670f5 into main Oct 29, 2026
1 check passed
@techmore
techmore deleted the claude/tailscale-vpn-status branch October 29, 2026 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant