Commit Graph
3 Commits
Author SHA1 Message Date
Aleksandr Bogomiakov 43894612ee Fix macOS exit sharing and bring exit selection onto the phone home screen
A Mac could install PF rules and advertise itself while IPv4 forwarding
was still off. Check and enable forwarding when applying the offer and
refresh the physical route when the uplink changes. Try the agent's
existing privileges first. When an existing utun needs additional
permission, the foreground tray or CLI can obtain an administrator grant
scoped to the local UID and overlay subnet. Reconcile the current offer
after the dialog so a withdrawal during authorization stays effective.

A user agent denied a host utun can serve peers over bounded TCP, UDP
and ICMP echo sockets bound to the physical interface. Keep host routes
and ordinary local application traffic on the system-utun path. Preserve
the saved choice for intentionally off-host setups and report readiness
separately.

Report exit selection directly to the selected peer over its authenticated
session. Older peers appear for one minute following forwarded traffic.
The optional announcement trailer remains compatible with control v8.
Local IPC v29 carries the new status and authorization results.

Keep the exit user count, left-aligned names and one-row scroll controls
in a single fixed-height block alongside the network details. Show health
and a small traffic trace on folded cards. Open desktop Devices at a
usable width and keep the exit action clickable in its compact layout.

Replace Android's per-card exit buttons with a fixed thumb-sized control.
The chooser and Quick Settings share one list with a single local option,
network groups, measured latency and an accessible confirmation sheet.

Release the applications and packages as 1.0.9.

On macOS, checked formatting, strict workspace Clippy and the workspace
all-target test suite, including real encrypted agents and loopback TCP,
UDP and ICMP. Ran the opt-in user-mode exit UDP round trip on a physical
IPv4 interface. Verified the authorization scripts and syntax of their
PF, sudoers and AppleScript components. The privileged two-utun kernel
test is reserved for an isolated macOS runner. Rendered phone and desktop
layouts in both themes, built the arm64 Android debug APK and cross-
checked all workspace targets for Windows GNU.
2026-11-26 01:57:51 +02:00
Aleksandr Bogomiakov fb7a959d23 Restore WireGuard tunnels after rapid reconnects and log QUIC closes
A peer can leave and return with the same WireGuard public key between
reconciliation passes. The old reader then stays attached to a closed
logical channel even though the carrier is up. Retain a tunnel only while
its endpoint, announced key and open channel still match. Stop retired
readers and start a handshake on the replacement channel. Carrier changes
under the same channel keep the session and traffic counters.

Record the newest channel before waking the worker, including while a
network key is loading. A burst that fills the bounded command queue can
now delay a sync without losing the channel the core handed over.

Capture the QUIC close cause before local session cleanup. Include the
network name and last known peer hostname alongside their IDs in the
disconnect log. Report transport and application codes without copying
arbitrary peer-supplied close text. The in-process disconnect event gains
name fields. Mesh protocols, local IPC and storage formats stay compatible.

On macOS arm64 both the loopback reconnect and close-code tests failed
before the fix. The locked workspace suite now passes 606 tests with five
opt-in tests ignored. It covers bidirectional IP after reconnect and a
saturated notification queue. Formatting and strict workspace Clippy passed.
2026-11-25 18:22:50 +02:00
Aleksandr BogomiakovandClaude 9966b50407 Rename the CLI package to tsunagi and its executable to tsng
The command line package is now `tsunagi` and builds the `tsng` executable,
which the packages, the unit, the installers and the workflows install and
run. The core library package becomes `tsunagi-core`, keeping the library name
`tsunagi`, so no code changes `use tsunagi::...`. Directories follow
(crates/tsunagi-core, crates/tsunagi). Every command shown to a person is now
`tsng ...`.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-03 02:14:43 +01:00