16d7f82af582f97cda18ad10844447799681e859
130
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
16d7f82af5 |
Group data transports and add reverse TCP dialing and Shoes carriers
Let the elected opener invite its authenticated peer to dial back after a forward TCP attempt fails. Limit the reverse attempt, correlate failure replies with the active generation and cancel it on membership or policy changes. Only mutually enabled carriers with link-reverse v1 participate. Keep native TCP/TLS wire v2 and use the advertised TCP port with direct control-path or configured bootstrap IPs. Race candidate connects, bound handshakes, verify the Ed25519 SPKI and wake every link-close waiter. Add two separately versioned embedded Shoes profiles. VLESS runs over XHTTP stream-one with HTTP/2 and pinned TLS 1.3. Shadowsocks 2022 selects AES-128-GCM or AES-256-GCM per connection. Allocate a new credential and request path or salt for each attempt and admit it once through private mesh control. Both profiles terminate a local mesh service and retain the existing inner WireGuard tunnel. Attribute the adapted Shoes v0.3.8 wire code and keep its MIT license. Preferred ports are 9443 and 9444. Expose WireGuard, iroh, Native and Shoes as collapsible groups in the desktop and Android transport editor. A partial group's checkbox enables all its children. Keep the global protocol priority, save the concrete list per network and preserve explicitly saved choices including none. New networks enable all six carriers. Keep the existing CLI protocol names and unqualified port behavior. Advance local IPC to v30 for the catalog labels and groups. The existing network identity and encrypted data formats for the four original protocols stay compatible. Checked formatting, strict workspace Clippy and the full macOS workspace test suite (684 passed, 8 opted out by default). The initial sandbox denied loopback sockets. A full run also exposed an overly broad control dispatch check in the existing standalone AWG test; restoring the transport contract fixed it. Ran the opt-in upstream Shoes 0.3.8 reference test on loopback for HTTP/2 and both Shadowsocks methods. Checked Android arm64 and Windows GNU targets by cross-compilation. No live DPI or physical-device network measurements were performed. |
||
|
|
68f19d1758 |
Release Tsunagi 1.0.10
Synchronize the Rust packages, internal dependency requirements, Android version name and Nix package version for the network card, exit picker, traffic monitor and macOS routing fixes. The speed-test protocol keeps its independent version. Verified locked Cargo metadata and formatting for the release bump. Clippy and the macOS workspace suite passed before the metadata change (673 tests passed, 7 ignored). |
||
|
|
8e0cfc97ac |
Keep Android exit lists scrolling and test exits by network
Deliver the primary touch release to egui one frame before clearing the pointer. This preserves the velocity that ScrollArea uses for a fling. Cancellations clear it immediately and a new primary touch takes precedence. Add a speedometer to each network heading in the exit chooser. It reuses the Devices batch command and capability checks. Show queued or measured results in the existing rows and let the same control stop the batch without selecting a different exit. Verified scroll deceleration, cancellation, consecutive gestures and per-network start/stop with egui input tests. The Android ARM64 check, formatting and workspace Clippy passed. The macOS workspace suite passed 673 tests with 7 ignored. |
||
|
|
7b83aec3be |
Keep the network address visible as peers reconnect
The collapsed card allocated the graph and peer count before the address and reserved a fixed 110 points for every network name. A growing count could hide an assigned address, even beside a short name. Measure the title and reserve the address first. Use the remaining space for counts and the sparkline, and include the address in the card tooltip. Reproduced the old layout failure and verified the vpn card at 320 and 359 points as its online count grows from 1 to 14. Confirmed the agent and macOS interface still had the reported address. |
||
|
|
21de427c62 |
Show known mesh names in traffic monitor endpoints
Index peer and VIP addresses from the agent status by network ID. Use the mesh DNS zone spelling in the IP flow columns, retain ports and show the numeric endpoint on hover or long press. A checkbox switches the display without changing capture keys, numeric sorting or stored history. Verified overlapping networks, external addresses, VIP withdrawal and the rendered checkbox and tooltip in the tsunagi-ui tests on macOS. |
||
|
|
a1da4bf498 |
Restore workspace checks on GitHub Actions
Install the GTK and Ayatana development packages in every Linux job that builds the tray. Check the core package explicitly in the library-only job. The peer exchange and WireGuard examples no longer exist. Their scenarios are integration tests in the workspace. Keep those tests and smoke-test the shipped tsng binary. Open the Windows log-rotation fixture with write access when extending it. An append-only handle cannot set EOF on Windows. Verify the rotated file retains its full length. Remove public rustdoc links to private or platform-specific items while keeping warnings fatal. Verified 697 workspace tests on Linux ARM64 and 668 on macOS. Formatting, Clippy, rustdoc with warnings denied, the core-only check and the CLI smoke test passed. Linux also passed the Rust 1.91.0 workspace check and the Debian upgrade-order fixture. No native Windows runner was available locally. |
||
|
|
9920d4c10f |
Preserve macOS exit replies and isolate the Linux service fixture
Apple PF restores the forwarding tag from the physical NAT state on replies. Steer only packets sourced in an offered mesh and destined outside the offered ranges. Reverse-translated replies can then leave on the utun, including while the local host uses an upstream exit. Apply the same rule in the authorized sharing helper. An older installed copy can still clear its anchors. Re-enabling sharing upgrades it through the normal authorization dialog and preserves existing subnet grants. Run the Linux namespace B process with a service environment. Give its parent an explicit login environment in CI to keep exercising this boundary without weakening the agent’s login-session guard. Reproduced the Linux denial and passed the corrected established-flow test in isolated kernel namespaces. On macOS the workspace suite, Clippy, formatting, exit helper regressions and the PF syntax check passed. The privileged two-utun test requires a disposable Mac and was not run locally. |
||
|
|
7dacc4517e |
Tighten icon spacing in network cards
Let the metadata grid size its icon column to the glyphs and give the values the remaining width. Use a three-point gutter for all five fields on both desktop and Android. Check the rendered gap on each row at desktop and phone widths. All 45 shared UI tests passed on macOS, along with formatting and workspace Clippy. The full workspace suite passed on the preceding release commit. |
||
|
|
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. |
||
|
|
d8b7787430 |
Keep the devices window responsive and make traffic flows sortable
A waiting peer or speed-test animation in an immediate egui viewport repainted the parent and its other windows. Each pass also supersampled the same 64-pixel logo and handed the new allocation to the OS. Give each Devices window its own repaint schedule. Wake it when status or shared controls change, reuse the native icon, and skip measuring the wide roster when its remembered minimum width exceeds the viewport. Use the bundled Phosphor StopCircle for single and batch tests. Bind incoming throughput probes to the signed address pair for the running diagnostic. Cache its validity across packets under a routing revision. A change of ownership, including removal or reassignment, revalidates the pair under the routing read lock. This removes a lock and a linear peer search from the steady-state receive path and keeps the timing, byte limits and wire protocol compatible. Give the traffic inspector a pinned header and compact, aligned rows with readable text in both themes. The column chooser keeps the peer visible on a narrow screen. Clicking a header sorts the complete filtered capture with a stable cursor across pages. Maintain one sort index on the window's scratch database and expire idle rates there. Address sorting uses numeric IP and port values. Peer and network sorting follows displayed names, including live name changes. Bump the applications, Android package and Nix package to 1.0.8. On macOS, verified formatting, workspace Clippy and all-target tests, including real encrypted tests between local agents. Rendered the monitor in light and dark desktop themes and at phone width. Built the arm64 Android debug APK and cross-checked the Windows GNU target. Across 500 optimized viewport updates, egui produced 500 native icon replacements on 1.0.7 and zero with this change. |
||
|
|
b47acb8321 |
Fix peer speed measurements and fit compact traffic counters
A slow first download could make the rate search settle around 60 Mbit/s on a much faster link. A final faster train could also exhaust the byte budget before its feedback reached the sender. Reprobe above the first apparent limit and use unique payload actually delivered over sustained sender and receiver intervals. Count each submitted packet even when the tunnel is backpressured, and keep the unused part of the pacing batch available. The five-second deadline, metered limits and v1 wire format remain compatible with existing peers. Show achieved Mbit/s in the devices list and describe a lower bound in the tooltip. Reserve a font-measured TX/RX width independent of changing byte counts on narrow desktop windows and landscape Android. Support counters through exabytes and retain exact packet counts. Align the application, Android and Nix versions for 1.0.7. On a shaped 300/250 Mbit/s path with a cold download, the regression measured 295/247 Mbit/s after the fix and 59/244 on 1.0.6. The suite also covers trailing feedback, local tunnel pressure and compact layouts at multiple font sizes and display densities. Mixed 1.0.6/1.0.7 speed sessions completed in both roles. Two unmetered runs over real WireGuard on loopback measured 251 and 250 Mbit/s down and completed both directions in 3.0 and 3.1 seconds. On macOS arm64, workspace formatting and strict Clippy passed, and the locked all-targets suite passed 646 tests with six opt-in tests ignored. Cargo also reported the existing directories manifest warning. The GNU Windows workspace cross-check and Android arm64 debug APK build passed. |
||
|
|
e3b74babba |
Add an on-demand traffic monitor to the tray and Android
Show bidirectional IP conversations with network and peer names, ports, traffic roles, packet totals and directional rates. Aggregate ICMP echoes by address pair. Attribute exit requests and replies from each endpoint's perspective and match VIP traffic on the client-facing side of NAT. Keep authenticated control sessions and opaque relay pairs in a transport view. Each open window owns a bounded interval subscription. The idle path only checks whether a reader exists. Contended writers can use another lane, and observations lost under load are counted without delaying forwarding. Use a dedicated local control connection on desktop and a service handle on Android. Closing or backgrounding the Android screen releases capture. The local IPC format advances to 28. Existing mesh peers and databases remain compatible. Accumulate intervals off the render thread in a private temporary SQLite database. Expire inactive rows after a minute or retain them until close. Indexed, cursor-based pages keep long sessions out of UI memory. Closing the window interrupts pending queries and releases the scratch database. On macOS arm64, workspace formatting and strict Clippy passed. The locked all-targets workspace suite passed 641 tests with five opt-in tests ignored. Coverage includes real WireGuard exit traffic in both directions, local IPC lifetime, Android pause/resume, relay opacity, VIP translation, bounded capture, simulated three-day retention and 320–900 point layouts. The Windows GNU workspace cross-check and the offline Android arm64 debug APK build passed. Windows and Android hardware were not exercised. |
||
|
|
7afed15f76 |
Release Tsunagi 1.0.6
Align the application packages, internal dependency requirements, lockfile, Android version name and Nix package with this release. The optional peer speed test negotiates its own version-one wire format. Existing network identities and stored configurations work across the upgrade. On macOS arm64 the locked workspace test run passed 632 tests with five opt-in tests ignored. Workspace formatting and strict Clippy passed. The Windows GNU workspace cross-check and strict Windows core Clippy passed. The independent Linux namespace and socket regressions are recorded in the routing commit. The local ARM64 debug APK reports versionName 1.0.6. |
||
|
|
e7de9b44af |
Keep forwarded exit traffic on the gateway’s own uplink
When A selects B and B selects C, B’s own default route must not carry A’s forwarded packets on to C. Accept only locally sourced overlay traffic for the client default, while keeping authenticated member traffic on the physical uplink from its first packet. Replies still route to the owning member. Switching B’s default does not tear down A’s existing flows. On Linux, distinguish forwarded packets and SNAT replies from local traffic, including strict reverse-path checks when the agent runs as root. On macOS, tag packets on the offered utun and keep their PF NAT state on the physical interface. On Windows, use interface-bound sockets and a bounded smoltcp TCP endpoint, UDP flow mappings and ICMP echo. An offer and its live sockets survive changes to the client's split routes and transient uplink discovery failures. Remove only owned legacy WinNAT objects. Document the supported IPv4 protocols and resource limits. Real WireGuard agents exercised A, B and C. Two Linux ARM64 namespace tests passed in an isolated Colima container with strict reverse-path filtering. The same destination saw A keep its physical SNAT TCP session while B's local connections switched to C and back. Strict Linux core Clippy passed. Six portable socket regressions passed on macOS, including TCP resets, both half-close orders, UDP port stability and resource limits. The macOS PF rules passed native syntax checking and the Windows target cross-compiled on macOS. Extended privileged macOS and Windows fixtures are available in CI; neither native system routing test ran on this host. |
||
|
|
200e716c28 |
Measure live peer throughput on the encrypted mesh path
Advertise an optional versioned diagnostic to authenticated peers. A small control exchange negotiates limits and carries receiver feedback. Paced IPv4 probes enter the ordinary WireGuard tunnel and follow its current carrier or relay. Accept them only for an active session and the peer's actual signed address pair. Agents without the capability still exchange normal mesh traffic. Raise the offered rate using receiver-clock windows and unique payload bytes. Require sustained delivery before reporting a rate, distinguish a lower bound from a measured ceiling, and discard interrupted live values. An agent runs one exchange at a time, with a five-second deadline and a cap at both ends. Queued exit tests share a separate batch budget. Keep bounded per-network results in memory and cancel on session replacement, network removal or a change to a metered underlay. Add a fixed speed cell to desktop and Android device views. Show direction and live rate, let a click on the result rerun the test, and offer a stoppable sequential test of compatible exit nodes. Expose local actions and progress over IPC v27. Mesh identity and stored state are unchanged. On macOS arm64 the real WireGuard test covered both directions, a control-only peer, the responder's metered limit and stopping a repeat. The three-peer exit batch test passed. The diagnostic crate passed 17 tests including shaped throughput, loss, delay, duplication and bursts. All 33 shared UI tests passed. Strict Clippy passed for the diagnostic and core libraries and an ARM64 Android debug APK was built. |
||
|
|
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. |
||
|
|
6a0a87e76c |
Keep the selected exit ready and report idle tunnels in 1.0.5
Read the exit network and endpoint from the published routing choice. Start a normal WireGuard exchange at 120 seconds for that tunnel even when idle. BoringTun keeps the current key usable during the exchange and owns retry and expiry. Switching or clearing the route also moves or removes the renewal policy. Show Idle in the tray, on Android and in CLI status after 30 seconds without IP traffic on a previously established tunnel. Keep key changes and keepalives out of activity, and keep waiting packets, missing paths and transport errors visible. Preserve queued flow tags when a native keepalive occupies a slot and drain pending IP on key confirmation. Bump the local status IPC to 26 and update the workspace, Android and Nix versions. Upgrade the daemon and desktop clients together. Mesh protocols, key lifetimes and persistent storage remain compatible. On macOS arm64 the initial workspace run passed 602 tests. A separate 181-second two-agent test observed renewal only in the selected mesh and delivered its first internet packet after idle. Formatting and strict workspace Clippy passed on the release sources. The maintainer requested publication without waiting for another full test run. |
||
|
|
e3e6089d0b |
Adapt mesh views to phone rotation and toggle the exit from Quick Settings
Use the available width for the Android device table, keeping individual peers expandable and their full details reachable in both orientations. Show network selection and settings side by side in landscape and reuse the VIP editor with a compact toolbar and width-aware backend columns. Retain the selected network, expanded peer, traffic unit and VIP draft across rotation. Show data-channel readiness consistently in the tray and on Android. Distinguish an establishing channel, a disabled data plane, an offline peer and a transport failure. Use an animated arc for visible waiting peers. Explain Phosphor controls on hover, focus and long press, and provide a masked-by-default reveal button in the shared secret field. Store the last confirmed exit network and endpoint in Android's private preferences. A Quick Settings tap disconnects that selection or restores the exact peer through the existing agent. First use opens the chooser. On a cold start, wait for an authenticated exit offer outside the command loop. Check the current selection again before changing the route. Only changed exit offers wake roster subscribers. Wire formats, software version and mesh identity storage remain compatible. On macOS arm64, cargo fmt and strict workspace Clippy passed. The locked workspace suite passed 598 tests with four opt-in tests ignored. Built the tray, the ARM64 debug APK and its test APK. All three instrumentation tests passed on an Android API 37 emulator. Opened the chooser from the actual Quick Settings tile, rotated the activity and inspected rendered device lists with ready, waiting, failed and offline peers. Physical phones and native Linux and Windows builds were not exercised. |
||
|
|
50c0ecea45 |
Reduce idle mesh traffic and Android background work for 1.0.4
A phone keeping its mesh online was paying for two data-path probe exchanges per WG or AWG link, repeated control snapshots, and a full Android status and DNS rebuild every two seconds while the activity was closed. Let a timely, authenticated reply of the requested size on the physical carrier satisfy its native delivery check. Keep the full-sized probe, RTT window, loss thresholds, roaming, and independent silence detection. Resume native probes when shared confirmations go stale and answer both probe formats throughout the lifetime of the pair. Index the latest signed objects once per network. Each reliable session sends a full snapshot on connect and advances its cursor only when a frame enters its send queue. Reopen the affected stream if a replica cannot persist a received update. Send canonical peer hints in bounded batches, publish changed edges immediately, and refresh reachability ahead of its 90-second expiry. The scheduling revisions live in memory and peers use the existing wire formats and database schema. Drive Android DNS and selected-exit notifications from coalesced roster changes. The visible activity requests fresh counters, reusing the current DNS zones. Set the workspace, Android, and Nix package versions to 1.0.4. Formatting and strict workspace Clippy passed on macOS arm64. The locked workspace suite passed 594 tests with four opt-in checks ignored. Both Android instrumentation tests passed on an API 37 arm64 emulator. Tested mixed 1.0.3/1.0.4 pairs on WG and AWG. In a 30-second idle WG comparison, one endpoint's combined UDP bytes fell from 220950 to 138596 and its control messages from 24 to 2. Physical phone discharge and native Linux and Windows runs remain unverified. |
||
|
|
8c4c2fa34e |
Fold network cards and show which peer carries exit traffic
Start the tray and Android overviews with each network folded under its bold name. Keep the selected exit, its host name and its sent and received byte totals visible. Put VIP beside Copy secret and Show devices. Default to bytes and make the unit switch update the desktop traffic column, totals, rates and plots together. Open the devices window at 1000 points wide and bound the network and per-peer plots. Use both sides of the phone detail view for transport, latency, version and traffic. Attach counters to the current network and exit peer. Count off-mesh IP bytes after carrier acceptance and replies after local interface delivery. Changing the selection starts new totals. Ordinary mesh traffic to the same peer and rejected packets stay out of the exit counters. Advertise the agent release as an optional bounded trailer on an authenticated control v8 announcement. Older readers can ignore it and older peers display an unknown version. Release labels live for the session and do not participate in authentication or wire negotiation. The new status fields require local IPC v25, so update the daemon, CLI and tray together. Existing mesh identities and databases need no migration. On Android, request system interface consent on the first app launch. Respect an explicit stop or declined consent across launches. Start Tsunagi Agent re-enables automatic startup. Checked formatting and strict workspace Clippy on macOS arm64. The full locked workspace suite passed 588 tests with four opt-in tests ignored. Built the tray and Android debug APKs. Both instrumentation tests passed on an Android 37 arm64 emulator, including app startup, stop and restart. Checked the first-run permission prompt and the rendered phone and desktop layouts. Native Linux and Windows tests were not run on this host. |
||
|
|
f9f67f88b1 |
Prepare the 1.0.3 release
Promote the confirmed release candidate to 1.0.3 across the workspace packages, internal dependency requirements, lockfile, Android app and Nix package. The change is limited to release metadata. Tests were skipped at the maintainer's request. |
||
|
|
a189d0ad3e |
Preserve mesh transport through an internet exit in 1.0.3-rc1
On macOS a connected socket using the physical source lost its route before PF could see the packet. Fresh sockets could leave via the physical uplink, but Darwin rejected reverse-NAT replies delivered to a utun address there. With two live meshes remote control and data sessions expired within a minute. Install matching interface-scoped uplink routes before capturing the two unscoped defaults. Keep PF state on the physical interface, preserve transport ports and return tagged replies via loopback. Reconcile uplink changes and recover only owned routes using a private journal and kernel markers. On Windows keep existing LAN routes, retain recent verified reconnect paths and refresh the gateway and relay DNS without replacing the split defaults. Exercise two memberships of the same peer, new and established native transport sockets, ordinary application traffic and scoped route cleanup. Run hosted macOS and Windows native regressions on affected changes. Bump the packages to 1.0.3-rc1 and encode Debian prereleases with a tilde so apt can upgrade to the final release. Mesh wire formats and identities are unchanged. Checked workspace formatting, strict Clippy and the full workspace suite on macOS (586 passed, four opt-in tests skipped by default). The privileged macOS kernel test passed separately. A launchd trial of the RC kept master and ch reachable over both meshes and used the external exit past the original timeout. Disabling the exit restored the physical IP and cleared the routes. Linux ARM64 passed four real-agent exit tests and the privileged netns regression. The RC APK passed the dual-subnet UDP/ICMP test on an Android 37 ARM64 emulator. Verified Debian and pacman version ordering. Native Windows execution is covered by the hosted workflow and was not run on this Mac. |
||
|
|
32aa73721a |
Keep every active mesh reachable through a single internet exit
With several IPv4 aliases on a single TUN, the default route could select an address from a different mesh. The exit peer then rejected internet traffic as an invalid source. Concurrent cross-network exit selections could also clear each other in the running agent while SQLite kept one winner. Serialize validated exit choices with network lifecycle and persist each choice before publishing it to the shared routing table. Replace the previous exit atomically and preserve it across allocation updates. Both mesh subnets keep their own routes. Only replies from the selected exit to the local address of its network qualify for the external-source exception. Prefer the selected source on Linux and macOS default routes. Preserve physical transport paths and update split routes in place. On Windows reuse the Android packet translation to restore off-mesh TCP, UDP and ICMP replies to the original local socket. Existing databases, IPC commands and wire protocols remain compatible. On macOS, formatting and strict workspace Clippy passed. The full locked workspace suite passed 577 tests with three ignored, after correcting a stale Windows script-test matcher. Three real agents covered switching, concurrent selection, offline isolation and restart. On Linux arm64, 88 focused tests and the privileged kernel routing/firewall test passed. The Android arm64 library built and linked. Wintun and privileged macOS utun were not exercised on live hosts. |
||
|
|
ee77ddb9ac |
Prepare the 1.0.2 release
Set package versions and internal dependency requirements to 1.0.2 throughout the workspace, lockfile, Android app and Nix package. The optional link comparison uses the existing mesh wire versions. Upgrade the CLI and tray with the local agent for IPC v24. Checked locked Cargo metadata and tsng --version. Workspace formatting and strict Clippy passed on macOS, and 568 tests passed with three opt-in checks skipped by default. Native elevated macOS utun and Windows Wintun source selection passed on hosted runners. Verified Linux kernel source selection in a disposable network namespace and bidirectional UDP and system ping on an Android API 37 ARM64 emulator. |
||
|
|
219bd018db |
Let healthy carrier comparisons recover from startup probe loss
The first probe on a newly opened carrier can precede the responder’s private health profile. Keep measuring for up to 30 seconds if the 20-probe window still contains losses or too few samples. A clean link still qualifies after six seconds. The ordinary 60-percent link failure detector continues to count every missed probe. Tested the acquisition, recovery, insufficient data and persistent-loss decisions. The slow TLS and fast QUIC loopback fixture can expose its measurements through the existing test logging switch. Workspace Clippy and formatting passed. |
||
|
|
15a4e45710 |
Prioritize live traffic recovery over a stalled carrier comparison
When the incumbent went down during a background dial, an unrelated healthy third carrier could wait up to 30 seconds. Restore the configured fallback order immediately if another carrier is eligible. Cancel the pending dial and invalidate its result so a late link cannot overwrite recovery. Keep the comparison alive if it is the only available fallback. Reproduced the timeout with two loopback agents, a real WG carrier, a stalled TLS handshake and QUIC. All four carrier integration tests passed after the change, including bidirectional delivery over the recovered path. Workspace formatting and Clippy passed on macOS. |
||
|
|
972b98363d |
Restore the socket source address across Android mesh networks
Android VpnService routes can select the primary VPN address for traffic to a second subnet even when both aliases are installed. Keep a bounded binding at the local TUN boundary so the peer receives the source it owns in that network and the original Android socket receives the reply. Preserve native primary traffic, separate per-subnet capacity, handle fragmented IPv4 and quoted ICMP errors, and retain eligible bindings when VpnService replaces its descriptor. Support TCP, UDP and ICMP echo. An ambiguous tuple retains its original binding. Explicitly bound traffic for other IPv4 protocols passes using the proper network address. Mesh authentication, address admission and wire formats stay unchanged. Reproduced the wrong source on a disposable Android API 37 ARM64 emulator. After the fix, system ping and an unbound connected UDP socket both received replies across each real VPN subnet. Built both debug APKs and confirmed that only the instrumentation APK includes its helper. Eleven focused Rust checks cover reverse mapping, checksums, fragments, limits and reconfiguration. |
||
|
|
2e83483f00 |
Restore Windows native test compilation
The real Wintun check exposed three Windows-only test calls that predated the access argument to ControlSocket::bind. Pass Private for these isolated named pipes, matching the Unix fixtures. Run native subnet checks for edits to the underlying TUN implementation as well. Confirmed the first hosted Windows compilation failed on exactly these calls. The revised Windows checks run on the hosted runner. Production IPC behavior is unchanged. |
||
|
|
27e29cf8a7 |
Keep concurrent overlays working and select faster data carriers
A second subnet on macOS could send with the first utun alias. Reconcile and verify each owned subnet route with its actual source, retry partially applied plans and expose host errors to clients. On Windows verify the alias and prefix on the intended adapter. Do not restart underlay sockets when the only network change is a local overlay address. Compare mutually enabled carriers using authenticated data probes while the incumbent carries traffic. The dialler coordinates a generation-scoped decision after a sustained median RTT improvement. Old peers retain ordered fallback. Local IPC moves to v24 to report data RTT and the physical path independently of control RTT. The mesh wire versions, keys and saved network settings stay compatible. Validated formatting, workspace Clippy and the workspace test suite on macOS, including bidirectional dual-network traffic and a live TLS-to-QUIC switch on loopback. Added focused native CI tests for macOS and Windows. The elevated utun test requires administrative access unavailable on the development host. |
||
|
|
e3a86aa9d3 |
Prepare the 1.0.1 release
Align the workspace package versions and internal requirements, lockfile, Nix package and Android default version name with the release tag. Validated on Apple Silicon with cargo fmt, clippy and all workspace targets (547 tests passed, 2 ignored). Built the release CLI and tray, checked the CLI version and verified the ad hoc signature of the packaged macOS application. |
||
|
|
ef67e1c0ae |
Add a Rust Android mesh client with shared tray views
Run one agent for all joined networks behind Android's VPN service. Share transport registration and reporting with the CLI, and move the tray's egui forms into a Rust UI crate. Phones use compact device rows and a full-width exit picker with RTT and data path. All four transports retain their per-network selection and priority. The phone consumes remote IPv4 exits and keeps the existing desktop identity and wire protocols. Send discovery and transport traffic over the physical network and bind VIP TCP health checks to the mesh. Build local DNS zones from the same signed membership and VIP records on desktop and Android. Answer UDP and TCP queries on the VPN, keep unknown mesh names local, and resolve public names through Android's underlying resolver, including with an exit. Show an ongoing notification for the selected exit. Guard its disconnect action against a stale selection and keep mesh routing and DNS alive when it removes the default route. Remove the app notification in mesh-only mode. Document Android 14's unlocked-device swipe behavior. Checked formatting and ran locked all-target workspace Clippy with warnings denied and tests on macOS (547 passed, 2 ignored). Built the arm64 debug APK. A physical Pixel resolved a mesh member and a Kubernetes VIP, answered UDP and TCP DNS, and reached the API over TLS (HTTP 401 without credentials). On a separate Android emulator the notification action removed the default route and notice while mesh DNS still worked. |
||
|
|
9dec056349 |
Prepare the 1.0.0 release
Set all seven workspace package versions to 1.0.0 and align their explicit internal dependency requirements, Cargo.lock entries and Nix package version. The CLI, agent status and tray now report 1.0.0 rather than 0.1.0. Release packaging derives its version from the v1.0.0 tag through the existing workflows, which classify the tag as a stable release. This is a software version change only. Keep protocol wire versions, identity derivation, handshake encoding and storage schemas unchanged; no data migration or protocol upgrade is introduced relative to the current RC. External locked dependencies are unchanged. Each protocol crate retains its own version field. Validation on macOS: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 532 passed, 2 ignored - target/debug/tsng --version reports tsng 1.0.0 - Cargo metadata confirms all seven workspace packages are 1.0.0 - Compared Cargo.lock external package entries with HEAD: unchanged - git diff --check Tests ran outside the sandbox so real local test agents could open sockets. Linux/Windows release builds, native desktop GUI and Nix builds were not run. Commit and release tag are local; publishing is left to the user. |
||
|
|
66206544b0 |
Remove the tray dependency on libxdo
The Linux tray is built on Ubuntu and reused in Debian and Arch packages. Its default tray-icon feature pulls in libxdo through muda, tying the binary to the builder's libxdo SONAME. Arch now supplies libxdo.so.4 while existing release binaries can require libxdo.so.3. Disable tray-icon default features: libxdo only supports predefined clipboard menu actions, while our tray uses Open, Quit and a separator. Keep GTK support. Regenerate Cargo.lock without upgrading other packages, and remove libxdo build/runtime dependencies from both release workflows, Debian/Arch packaging and Nix. Update the Arch installation notes. Clarify that static Linux CLI binaries are release artifacts built for musl; ordinary host-target Cargo builds on glibc Linux are dynamic. Document the existing musl build command and its output path. Both release workflows still package the musl tsng independently of the GNU tray. No protocol, persistent state, crate version or release tag changes. Validation on macOS: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 532 passed, 2 ignored - bash -n dist/arch/build-pkg.sh dist/deb/build-deb.sh - Linux-target Cargo dependency graph retains GTK and contains no libxdo; resolved metadata contains neither libxdo nor libxdo-sys - git diff --check Initial offline resolution lacked smoltcp and sandboxed registry access failed; resolution succeeded with approved network access. The first sandboxed test run failed when child agents exited before readiness; the full run outside the sandbox passed. Linux release binaries, native GUI startup, packages and Nix builds were not run locally; CI/release execution is left to the user. |
||
|
|
2166ba4800 |
Separate internal WireGuard encryption from data carriers
AWG-only policy also selected a competing end-to-end plugin, so compatible external links could still have no compatible encrypted data channel. Carrier changes replaced tunnel state and status selected counters from different engines. Use one internal WireGuard plugin and a separate DataCarrier contract for external capabilities/lifecycle. Keep the logical link, keys, handshake, interface and counter epoch across policy, fallback and direct/relay changes. Control/discovery transport selection and membership remain independent. Share the bounded per-neighbour UDP WireGuard engine between ordinary WG and Amnezia masking. Encrypt the relay envelope inside the outer hop channel with fresh pair keys/PSK. Remove duplicate WG key/device code and the TCP/TLS inner cipher. TLS carries opaque internal WireGuard frames. Refuse missing native transports instead of letting default iroh impersonate their protocol names. Probe the actual authenticated carrier, independently of the shared IP tunnel; failed local probe submissions count as loss too. Apply the vendored iroh interface exclusion to actual direct candidates, not just public discovery records. Exclude overlay subnets from introductions and propagate the actual owned interface name, including kernel-assigned utun names, to every carrier. Production logs showed paths through the overlay itself. This removes a recursive transport path; it does not establish the historical cause of the reported 100 GB absolute counter. Exit-node traffic is also real peer IP traffic even when local applications are idle. Hide inner cipher choices/handshake clutter in CLI and tray. Report external routes, readiness and actionable policy/version failures. Count original IP packets only when their ciphertext is accepted by the logical transport, including queued packets' exact unpadded lengths. Exclude physical probes and keepalives. Export counter epochs; sum per-peer rate deltas and discard stale histories so joins/restarts cannot turn old totals into fresh traffic. Status also prints exact IP byte totals for comparison with the tray. Coordinated upgrade: data ALPN 6, internal wireguard-e2e capability v4, wg/awg v2, QUIC carrier v1, TLS v2, local IPC v23. Control ALPN 8, device/network identity derivation, signed records and saved network choices stay unchanged. Keep the historical wg-quic key store; transactionally import missing keys from wg then awg without replacing canonical keys. Forget removes legacy copies too, on the blocking pool, to prevent resurrection after restart. Preserve historic cipher options as shared settings, rejecting contradictory values. Validation on Linux in the Nix development shell: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets (562 passed, 3 ignored) The inherited service socket/secret/group environment overrides were removed for isolated CLI process tests. A new carrier test initially raced the first peer announcement; its deadline polling now waits for a peer row explicitly. Real loopback endpoints, membership, SQLite, WG/AWG/TLS encryption and memory TUNs cover mixed-carrier relaying and one smoltcp TCP connection surviving relay/direct/policy changes and a dropped transmission. Counter tests check exact plaintext lengths, refused sends, epochs, joins and stale histories. Public DHT, privileged kernel and manual benchmark tests remain ignored; macOS/Windows native TUNs, desktop GUI and WAN/DPI behavior were not run. |
||
|
|
2e7e238459 |
Improve tray VIP monitoring and table layout
The VIP editor put routing and traffic observations in a dense text block, while nested layouts in the devices grid could let text escape its row. Separate the VIP overview from configuration and draw both live tables with explicit cell bounds, font-aware row heights, clipping and horizontal overflow. Measure columns before painting and keep widths stable as live values change. The overview reuses the existing traffic sparklines for service totals and individual listener backends, with TX/RX rates, health, RTT, open flows and counters. Retain bounded histories by service/listener/backend identity and release them when their resources disappear. Recreated listeners start fresh. Use egui 0.31 Scene and Painter for a pannable, zoomable routing diagram with Fit, clickable backend details and linked table selection. Highlight recent counter growth separately from the backend selected for new connections; idle bindings alone do not imply traffic, and stale activity expires. Draw legend markers directly rather than depending on optional font glyphs. The overview only reads saved observations; edits and deletion still require Save. No dependencies, wire formats, IPC or persistent schemas change. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 566 passed, 3 ignored - cargo build --locked -p tsunagi-tray The inherited TSUNAGI_CONTROL_SOCKET was unset for Clippy and tests. Seven new GUI tests cover enlarged fonts, mixed online/offline rows, long names, large counters, narrow/wide layouts, scene clicks, traffic selection, stale samples, counter resets, listener recreation and history cleanup. The first enlarged-font regression exposed an override-font height mismatch; row sizing now resolves the actual selected font and the regression passes. A disposable fixture preview rendered successfully with software OpenGL on an isolated Xvfb display. Initial Xvfb attempts needed explicit xkbcommon and OpenGL runtime paths in the Nix environment. The preview never contacted an agent; its temporary source was removed. macOS, Windows, Wayland and live host TUN traffic were not exercised by this UI change. |
||
|
|
23af1a2d9d |
Add shared TCP and UDP virtual services
Provide named VIPs with independent protocol/port listeners and node/port backends so applications can use one DNS endpoint without a separate load balancer. Every authenticated member may create, edit or delete any service. Client agents select the eligible backend with the lowest measured encrypted data-plane RTT, including relayed paths, and pin existing flows. UDP recovers on another backend after failure; established TCP is never replayed or moved. An unanswered empty TCP SYN may retry another backend before establishment. Keep signed multi-writer field registers in state/vip.rs. Independent backend edits merge, same-field conflicts use Lamport/author/canonical ordering, and listener generations prevent old backend entries returning on port recreation. Permanent service tombstones protect replay while allowing obsolete fields to be compacted. Active-service and deletion-history limits are separate. Commit complete snapshots and the author's durable counter atomically before local routing changes or publication. Restore counters from newer genuine author updates learned from replicas after an old backup is restored. Implement bounded client-side address/port NAT at overlay ingress and reverse translation only after authenticated source/destination admission. Reserve OS source ports to avoid direct-flow collisions and quarantine retired ports for late replies. Handle a backend on the client itself, scoped fragment assembly, checksums, re-fragmentation and quoted ICMP/PMTU headers. Plugins and encrypted transit retain their existing contracts. Data-path probes measure RTT; bounded fair TCP connect checks are enabled by default and configurable per listener. Arbitrary UDP application readiness remains unknown; path checks and explicit port errors drive eligibility without protocol-specific probe payloads. Expose the shared draft API through local IPC, simple vip/listener/backend CLI commands, JSON, editor-based atomic updates and watch output. Add a VIP button on each network tile and a separate tray editor. Edits and removals stay local until Save; stale revisions retain the draft, and closing a dirty window offers explicit discard. Report local routing choices, health reasons, RTT age, active and draining bindings, IP counters, rates, drops and UDP failovers. Extend DNS with service names; keep numeric addresses secondary and preserve existing bindings while VIP addresses or listeners change. This changes control wire ALPN/version to tsunagi/ctrl/8 and local IPC to 22; all members and local clients must upgrade together. Data ALPN remains 5. SQLite schema 10 migrates existing mandatory state without changing identity, secrets, network ids, derivation labels, handshake encoding or node records. Crate versions and release tags are unchanged. No installed agent or tray was replaced. Commands, limits and operational semantics are in docs/vip.md. Checks on Linux in nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 559 passed, 3 ignored - git diff --cached --check The full suite includes real encrypted TCP/UDP VIP traffic, backend-stop UDP failover, real loopback TCP check recovery, source admission, signed merges, stale/deleted state, SQLite migration and rollback, restart/author recovery, network isolation, actual CLI/DNS processes, and headless text-entry/Save-button interaction. Discovery and memory TUNs are the existing test substitutions; authentication, transport, encryption and SQLite remain real. Initial checks outside Nix failed for missing GTK pkg-config metadata, and an initial CLI test inherited TSUNAGI_CONTROL_SOCKET. Final checks use the Nix environment with that variable unset so tests address their temporary sockets. Root/internet-dependent tests remain ignored. No live host TUN, native desktop session, macOS or Windows validation was performed. |
||
|
|
94318e7c16 |
Keep tray device metrics on one line
The device table sized handshake/RTT and packet columns from fixed samples. Its own header exceeded the handshake sample, and six-digit counters wrapped at the slash, making device and total rows taller and misaligning the plots. Measure actual headers, displayed values and totals before drawing, retain the widest values across frames, and disable wrapping inside table cells. When a column grows, request a second egui layout pass so the grid's cached positions settle before larger text is painted over the next column. Keep the plot as the stretch column and horizontal scrolling for narrow windows. This changes only tray presentation. A headless rendering regression checks the actual text shapes for the header, handshake age/control RTT, per-device packet counts and totals as counts grow past five digits, reach billions, shrink again, and the table gets a narrower container. It checks one-line text and non-overlap with the next column; it failed on the original wrapped header. Existing resize and long-relay tests remain in place. Checks on Linux in nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets, with inherited TSUNAGI_CONTROL_SOCKET unset so tests use their temporary sockets - git diff --cached --check The suite's root/internet-dependent tests remain ignored. No native GUI session or checks on macOS/Windows were run; rendering was checked through egui's headless output. No installed tray binary was replaced. |
||
|
|
2b0c938487 |
Bound iroh path retries to prevent multi-connection OOM
A long-running rc.33 daemon reached OOM with roughly 22 GiB resident and 24 GiB swapped. Live inspection found 40 GiB and 10/20 GiB anonymous container mappings; the active worker stack and tracing metadata identified iroh's scheduled path-open retry loop. In iroh 1.2.0 every failed connection requeues the same path, while each retry visits every connection again. Separate control and data connections multiply the queue geometrically. Vendor the published iroh 1.2.0 source and select it with a workspace Cargo patch. Deduplicate retry admission and cap distinct pending paths at 64, evicting the oldest before inserting a new candidate. Keep the current and next retry batches bounded without combining control/data connections or changing wire protocols, identity derivation, authentication or state. Document source provenance, the live evidence and removal conditions. Upstream PR 4551 merged on October 6, but inspection of the official 1.3.0 crate still shows the unconditional enqueue, so that upgrade alone is not a fix. No version bump, release tag or installed-service change. The default workspace suite includes the exact vendored admission module. Three regressions failed with the original enqueue and pass with the fix: repeated failures across connections, duplicate admission at capacity, and 10,000 distinct candidates with bounded length/capacity and FIFO eviction. Transport integration tests continue using real endpoints and encryption. Checks on Linux in nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets, with only the inherited TSUNAGI_CONTROL_SOCKET removed from the test environment - git diff --cached --check Initial full-suite runs failed six DNS readiness checks because the inherited system socket path overrode their temporary state directories. Clearing that environment variable resolves those failures without changing application code. Root/network-dependent ignored tests and other operating systems were not run. |
||
|
|
4e235cbac6 |
Keep device data paths on one line
The tray used a fixed sample for the data-path column, so longer relay names wrapped and made device rows uneven. Measure each rendered path and retain the widest value, then render path labels without wrapping. Replace direct/via words with embedded Phosphor route icons while preserving transport, relay name, hop count and explanatory tooltips. The app already ships the font; keep its setup in one function and verify registration alongside a long-relay-width regression test. No wire or stored-state changes. Checks: cargo fmt --all -- --check; cargo clippy --locked --workspace --all-targets -- -D warnings; cargo test --locked --workspace --all-targets. |
||
|
|
2631eb6975 |
Protect Linux exit-node connections and tidy the device table
Using an exit node could destroy direct peer connections: the agent's UID bypass protected outbound routing, but reverse-path checks look up replies without that UID and selected the overlay default. A real-host A/B check confirmed that relaxing only strict reverse-path filtering restored direct connections and exit HTTP traffic; the diagnostic host changes were removed. Keep strict filtering and protect the Linux underlay with a dedicated masked mark bit, 0x40000000. Mark the dedicated service UID in OUTPUT, save only that bit in conntrack and restore it before PREROUTING reverse-path checks. Install IPv4/IPv6 mark and UID main-table bypass rules before Tailscale's priorities; leave application-specific and exit-default routing after them. Preserve foreign mark bits, main-table routes and foreign firewall/policy rules. Protect the first inbound TCP/UDP packet using bounded, locally owned socket addresses/ports from /proc and an actual socket match. Refresh socket protection before sending private transport negotiations and on discovery ticks, without firewall writes for an unchanged socket set. Remote announcements never become OS arguments. A failed refresh leaves active exit routing in place. Install protection before routes, remove routes before protection, roll back partial activation, and remove only exact interface tags, including legacy UID rules. Reject strict kernel rp_filter without src_valid_mark with an actionable error; never weaken filtering or change host sysctls. Document mark-aware Netfilter requirements and provide the trusted ip6tables path in the NixOS module. Other platforms retain their existing exit implementation. Peer wire formats, identity derivation, local IPC and persistent storage are unchanged. Make the tray devices grid fill and shrink with the window, constrain the first cell and give remaining width to traffic plots. Keep displayed end-to-end protocol and its short encryption tooltip consistent, independent of carrier protocol. Move handshake/session age into its own column beside the existing iroh control RTT. Use stable per-device hover identities and concise tooltips; missing protocols/measurements remain explicit rather than invented. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 529 passed, 3 ignored; inherited TSUNAGI_CONTROL_SOCKET and TSUNAGI_CONTROL_GROUP were unset - explicit privileged kernel regression: 1 passed, using disposable namespaces, real TCP/UDP IPv4/IPv6, strict kernel and Netfilter RPF, first inbound packets, dynamic UDP binding, application exit routing/IPv6 blocking, repeated apply and exact cleanup with foreign Tailscale-priority rules retained - headless egui grid/scroll-area rendering at multiple sizes and control RTT, mark masks/order, passive socket parsing, partial failure and cleanup tests - git diff --check Earlier iterations caught rtnetlink family API and nonexhaustive initializer errors, Clippy warnings, egui's implicit minimum column width, and kernel-test fixture issues (wildcard echo source, blocked IPv6 neighbour discovery and a closed child stdout pipe). Corrected before final checks; the stdout-only test fix was checked with fmt, Clippy and the explicit kernel regression afterward. Native tray rendering and macOS/Windows checks were not run. The running host agent was not replaced or restarted. Requested release tag: v0.1.0-rc.32. |
||
|
|
90ef5cefec |
Retire offline node claims with equal network-wide cleanup rights
Offline devices reserved names and IPv4 addresses indefinitely, leaving stale members in the device history. Give every authenticated network participant the same right to retire another device's observed signed claim without an owner, quorum, permanent identity ban or secret change. Add a separately signed retirement containing the target's original signed claim as proof. Verify both signatures and network scopes, retain the strongest proved cutoff per target with deterministic ties, and suppress claim versions at or below it in membership, hostname ownership and IPv4 allocation. Keep the old signed records and range agreement, and retain markers after a newer claim returns so old replicas cannot resurrect obsolete reservations. A returning device signs a newer claim, allocates against current holders and resets its previous hostname priority rather than taking a reused name with an old time. Commit local retirement and the requester's author counter atomically before announcing it; receivers persist proofs before applying them. Bound history to 1024 targets by default, reject additional targets without evicting protection, and treat corrupt or over-limit mandatory storage as an explicit error. Repeat bounded marker batches with a per-session rotating cursor so queue pressure cannot indefinitely starve later markers. Exclude retired claims and cached hints from history-derived discovery without preventing a fresh authenticated device from returning. Expose Agent::forget_node through the shared local control API. CLI command tsng network forget-node accepts exact network names, full ids or unique id prefixes, and exact node hostnames, ids, prefixes or overlay IPv4 addresses. Ambiguous selections change nothing. Recheck the observed version and refuse self, online nodes, the selected exit node and absent or changed claims. Add Forget with an identity confirmation to offline tray device rows. Widen Show devices to 1440x640 with an 800x400 minimum to fit its contents. Control ALPN/version advances to tsunagi/ctrl/7 and local IPC to 21; upgrade all peers and restart the agent with matching CLI/tray clients. Data ALPN 5, network identity derivation, handshake encoding and existing record signing bytes remain unchanged. SQLite schema 9 adds retirement storage while retaining identity, secrets, settings and signed claims. Document behavior and limits. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 519 passed, 2 existing ignored tests; inherited TSUNAGI_CONTROL_SOCKET and TSUNAGI_CONTROL_GROUP were unset - git diff --check and the built CLI forget-node help Tests use real iroh authentication and SQLite. Cover restart, stale-replica recovery, equal rights and network isolation, hostname reuse and return, twelve marker batches through a two-message queue, malformed signatures and proofs, invented future cutoffs, deterministic merge, capacity, migration and injected counter-write rollback, selectors and cleanup through two real CLI processes. Earlier iterations caught a private test API, a collapsible tray conditional and a crash-based CLI test waiting for QUIC's idle timeout; corrected before the final successful suite. Manual tray rendering, macOS/Windows, privileged TUNs and public-network traversal were not run. The requested RC tag is v0.1.0-rc.31; no push was requested. |
||
|
|
13bdcaf98d |
Render protocol priority buttons with Phosphor icons
The tray protocol selection used ordinary Unicode up/down arrows for its priority buttons. The default UI fonts lack these glyphs, so both buttons rendered missing-glyph boxes. Use the regular Phosphor ARROW_UP and ARROW_DOWN icons already installed in the application's proportional font fallback. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets, with inherited control socket and group overrides removed: 509 passed, 2 existing ignored tests No new tests were added for the two glyph substitutions. Manual tray rendering and macOS/Windows checks were not performed. No release tag was requested for this fix. |
||
|
|
d941cdac7a |
Change network protocol selections at runtime
Protocol selection previously belonged to tsng up and therefore to the service command line. A blocked or degraded carrier could only be removed by editing the service and restarting the whole agent. Make the ordered selection a local per-network setting instead. Add Agent::set_protocols and a local control request shared by CLI and tray. Keep tsng protocols without arguments as the protocol catalog; naming a network shows its selection and supplying a comma-separated list replaces it. Accept exact names, full ids and unique prefixes using shared selector rules; ambiguous selectors and invalid lists change nothing. An explicit none selects control-only operation. Offline edits take the directory lock and apply on the next start; live edits never write behind the daemon. Register every built-in plugin and transport in the CLI. Treat up --protocol as ordered initial defaults for networks without an override, allowing a protocol absent from the unit to be enabled later. Retain the targeting of unqualified startup options and allow explicitly scoped options to configure initially disabled protocols. Persist NULL for inherited preferences and an empty selection distinctly in SQLite schema 8; migration preserves existing identities, secrets, signed records and counters. Serialize changes with network lifecycle operations and commit preferences before applying or announcing them. Retire only the affected network's data links and E2E channels, cancel pending opens, and reject obsolete completion results by attempt id. Clear peer data channels when authenticated protocol capabilities change while retaining control sessions and topology. Replay allocations and peer identities after asynchronously prepared plugins become ready. A control-only start defers creation of the agent's single interface until data is enabled; plugins receive a sink that can use it later. Automatic carrier fallback continues to preserve E2E state; explicit policy changes renegotiate it. Identity derivation and peer wire formats are unchanged. Add a collapsible protocols row to each tray network tile, with a catalog provided by the daemon, descriptions, immediately applied checkboxes and preference-order buttons. Keep editing disabled until the worker refreshes status so a second click cannot overwrite an edit using a stale snapshot. Local IPC wire version is 20 for the new request and report fields; upgrade and restart agent, CLI and tray together. Crate release versions remain unchanged; the requested RC tag is v0.1.0-rc.30. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets: 509 passed, 2 existing ignored tests, with inherited TSUNAGI_CONTROL_SOCKET and TSUNAGI_CONTROL_GROUP removed Tests use real iroh membership, SQLite, UDP, AWG and WireGuard encryption, QUIC carriers and memory TUNs. Cover either endpoint-id role, full-size packet delivery after switching, an unaffected second active network, saved selection after restart, empty/invalid selections, first enablement without restart, rapid changes racing old opens, live and offline CLI changes, startup-absent protocols and preservation of signed state through migration. Earlier compile and focused-test iterations caught initializer mistakes, a short test secret, asynchronous plugin allocation readiness, and an inherited system socket path; corrected before the successful final checks. Plain cargo was unavailable in the host shell, so validation used the Nix toolchain. Manual tray interaction, macOS/Windows, privileged host TUNs and public-network traversal were not run. |
||
|
|
e701986a39 |
Add ephemeral pairwise Amnezia transport and runtime fallback
Plain WG and QUIC can be blocked or severely degraded while the iroh control connection still works. Add an awg carrier with one independent UDP socket, WireGuard engine and randomized masking profile per network/peer attempt. The smaller endpoint id negotiates fresh outer keys, PSK, header protection, header ranges, padding and signature templates through private authenticated control messages. Restart or fallback reentry generates a new profile; ordinary rekeying preserves the current profile. No pair parameters enter signed state, capabilities, persistent storage or public message events. Private payloads and serialized control buffers redact and zeroize themselves. Adapt the bounded packet masking engine from RunaRoo/AmneziaWG-RS at commit 51579a7d6e8882d1d8d6d00822f09e18a9423b73, retaining its Apache license and provenance. Declare WTFPL AND Apache-2.0 in package metadata to cover both new glue and the adapted source. Reuse boringtun instead of upstream's Node/global executors and interface machinery. This is Tsunagi AWG wire version 1, with standard WG headers restored before authentication; external Amnezia server compatibility is not implemented. DNS/SIP signature generators vary fields instead of replaying captures. Each attempt closes independently, bounds allocation, queues, candidates and fragment assemblies, and supports the full 64 KiB carrier contract using UDP packets at most 1200 bytes. Yield between fragment batches so large messages do not starve local socket readers. Keep carrier encryption separate from end-to-end tunnels so multihop relays still forward opaque ciphertext. The system owns the sole interface, signed addresses and admission. Plugins receive neither network secrets nor paths. Expose a bounded opaque control sender at the transport boundary; core control messages remain outside protocol crates. Optional STUN on the pair's actual socket adds IPv4 public candidates in CLI direct/relay mode, with a finite query deadline and an off/alternate-server option. Local mode remains offline. Symmetric NAT, IPv6-only paths and arbitrary UDP blocking can still require fallback; no AWG-over-QUIC or hidden AWG relay is introduced. Default carrier order is wg, awg, wg-quic, tcp-tls. Advance the fallback cycle after setup failures and sustained runtime loss, even after earlier cooldowns expire. Authenticated delivery probes traverse the actual encrypted tunnel, fit the interface MTU and never enter the TUN. Retire after a 20-second warmup and at least 60% loss over at least 15 completed recent observations. Preserve logical tunnels and control sessions while explicitly closing physical links, including TCP reader/writer tasks. Retain the newest private probe settings across independently queued control negotiation and inbound installation. CLI/tray reports keep end-to-end protocol and actual carrier separate. Control ALPN/version becomes tsunagi/ctrl/6 for the new private message; upgrade all members together. Data ALPN/envelopes remain version 5. Network identity derivation, transcript encoding, device identities, signed records, saved network configuration and release versions are unchanged. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets, with the inherited TSUNAGI_CONTROL_SOCKET override removed: 504 passed, 2 pre-existing ignored Tests use real iroh membership, SQLite, UDP sockets and WireGuard encryption with memory TUNs. Cover three independent pairs, full-size IP and carrier frames, restart freshness/socket release, 80% carrier datagram loss, fallback to real iroh, fresh retries with working delivery checks, unequal small MTUs, malformed negotiations/profiles, role and resource bounds, probe forgery and STUN parsing. Earlier compile/lint iterations and focused tests caught RNG API/initializer mistakes, a retry assertion racing path installation, and a large-fragment burst overflowing loopback buffers; corrected before these successful checks. Normalized upstream license line endings for diff checks. Public NAT/STUN connectivity, actual DPI effectiveness, WAN performance, per-pair memory measurement, macOS/Windows, privileged TUN operations and manual tray interaction were not exercised. |
||
|
|
ed28e86748 |
Derive default network ranges and switch overlapping networks
Every first network previously proposed 10.13.37.0/24. Independently created networks therefore collided when a device joined more than one of them. Use the existing stable NetworkId-derived /24 in 10/8 for every new network, independent of activation order or peer availability. Legacy and explicit signed ranges outrank the derived default; remaining range disagreements still use author-id ordering. The derivation, identity labels, handshake and signed record encoding stay unchanged. There is no creator, timestamp or vote. Reserve ranges before starting network actors and serialise start, stop and switching through the agent lifecycle lock. Refuse equal or nested overlaps without changing a network's subnet locally. A late authenticated range that collides suspends only its network before updating plugins or the interface. Coalesced watch notifications let the agent clean up outside the network actor and reconsider suspended networks when ranges change. An explicit switch stops every blocker before activating the chosen network. Suspended networks retain their startup request and resume whenever their ranges become free, including switching from a wide range to a narrow one. A manual stop cancels that request even for an already suspended network. Persist preference order and enabling together in an SQLite transaction so the user's selection survives restart; no database schema migration is needed. CLI status and network listing show blocker names, ids, ranges and the start command. Network start switches explicitly and reports suspended networks; joining an overlapping network reports it as configured but inactive. The tray adds conflict details, an amber icon, Switch to this network and Keep stopped actions. Local IPC wire version is 19 for the extended reports, so restart the agent and tray together. Release versions and peer wire formats are unchanged. Update the user documentation and compatibility tests. Validation on Linux through nix develop: - cargo fmt --all -- --check - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo test --locked --workspace --all-targets with TSUNAGI_CONTROL_SOCKET removed from the test environment: 486 passed, 2 pre-existing ignored tests - final focused range_conflicts integration suite after making discovery fixtures deterministic: 6 passed Earlier validation attempts caught outdated diagnostic assertions, a new test helper scope error, and the inherited system control socket override. Those were corrected before the successful runs. Plain cargo was unavailable in the host shell, so validation used the Nix development toolchain. macOS, Windows, privileged host TUN operations and manual tray interaction were not exercised. |
||
|
|
781e359775 |
Make tunnel and transport layers explicit in status
The tray called the end-to-end tunnel proto and the current route link, then put the tunnel handshake age beside the route. A valid wg tunnel over a tcp-tls transport consequently looked like contradictory state. The terminal status used similarly terse wording.\n\nThe tray now separates end-to-end from data path, renders direct paths as direct over TRANSPORT, keeps handshake or uptime beside the tunnel, and explains both layers in hover text. Terminal status uses the same end-to-end tunnel, data path, transport detail, and control path vocabulary. Routing, protocol selection, IPC, and wire behavior are unchanged.\n\nPresentation tests cover wg over tcp-tls, tcp-tls uptime, relayed and missing paths, a missing handshake, and offline devices. The WireGuard broadcast checksum test uses the current slice-array iterator spelling required by Clippy; its behavior is unchanged.\n\nChecks: cargo fmt --all -- --check; cargo clippy --locked --workspace --all-targets -- -D warnings; cargo test --locked --workspace --all-targets with TSUNAGI_CONTROL_SOCKET removed from the test environment so integration agents use their temporary control sockets. All passed on Linux. |
||
|
|
97377e3703 |
Relay across any mix of links, one online answer for every client, first claim owns a hostname
A tunnel no longer depends on the kind of link under it. The relay hub keeps one forwarding table per network instead of one per protocol, the envelope names the end-to-end protocol, and a neighbour reached over several kinds of transport is sent to over the best open one. A member in the middle needs no protocol in common with either end. Which protocol a pair runs is settled by the lower endpoint id's announced order, so both ends agree without asking. A direct link that comes up later is shorter than the path through others, so traffic moves to it with the same logical link. The agent now answers "is it online" once: a live control session or any data path. Members and peers report how they are reached (direct over a named transport, relayed through a named member, or no data path yet), and `tsng status` and the tray both read that instead of a session list and a WireGuard handshake respectively. A hostname belongs to whoever claimed it first. A claim carries the time its author first claimed the name, signed with the record, and replicas order by (time, id) so every member names the same holder. A later claimant keeps working by address, is not found by the name, and is told so in its status, `tsng status`, the tray and a HostnameTaken event. Wire change: control and data ALPN 5, control PROTOCOL_VERSION 5, envelope version 2, signing domain v3, state schema 7, local control protocol 18. Upgrade every member together. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|
|
21328bf818 |
Windows installer: agent service, Wintun, tray and PATH in one setup program
Running on Windows needed wintun.dll by hand, an elevated console and a
manually started agent; without the DLL the agent silently ran with no
interface (and so no exit node or routing at all).
`tsng service` (hidden) runs the same `up` under the Windows service manager:
src/winservice.rs registers with the SCM through the windows-service crate,
reports Running/StopPending/Stopped, and maps a stop request onto the existing
shutdown path (stop_signal). The only unsafe is the extern "system" entry point
that define_windows_service! expands to, allowed in that module alone. A
service has no console, so it logs to %ProgramData%\Tsunagi\logs\tsng.log
(one older file kept past 8 MiB). Its state defaults to
%ProgramData%\Tsunagi\{data,cache} and its control socket to the system-wide
default every client already uses, so an unelevated `tsng status` and the tray
find it.
dist/windows/tsunagi.iss (Inno Setup) installs tsng.exe, the tray and Wintun
0.14.1 (pinned by SHA-256 in CI, licence text shipped), registers the
"Tsunagi" service as LocalSystem with auto start and restart-on-failure, locks
the data/cache/log directories to SYSTEM and Administrators by SID, and by
tasks adds tsng to the PATH, an inbound firewall rule for the agent and a tray
autostart. It stops the service, the tray and any hand-started agent before
replacing files; uninstall removes the service, rule and PATH entry and asks
before deleting the data (never on a silent uninstall). The release workflows
(GitHub and Gitea) build it on the Windows job and publish
tsunagi-setup-<version>-x86_64.exe.
.cargo/config.toml links the MSVC C runtime statically so nothing needs a
Visual C++ redistributable on a clean machine.
Compatibility: an agent run by hand keeps its data in the user profile; the
service has its own, so networks must be joined again once.
Checks: cargo fmt --check, clippy -D warnings, cargo test --workspace passed on
macOS (one unrelated wireguard restart test failed once under load and passed
on three reruns). winservice.rs was cargo-checked for x86_64-pc-windows-msvc in
a scratch crate; the whole tsunagi crate cannot be built for Windows from
macOS (aws-lc needs the Windows SDK). The .iss script and the CI step were NOT
compiled or run: no Inno Setup or Windows here.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
||
|
|
7c176e0b74 |
Exit nodes on Windows: use a member as exit node via destination bypass routes
Choosing an exit node on Windows did nothing: the using side was refused, because Windows has no per-user routing and the agent's own traffic would loop into the tunnel it carries. Now the overlay interface gets 0.0.0.0/1 and 128.0.0.0/1 routes (and ::/1, 8000::/1 as an IPv6 blackhole), and every underlay address the agent talks to directly gets a /32 route through the physical default gateway, marked with route metric 7373 so stale ones are found and removed. Bypass routes are written before the halves and removed after them; a failed step removes what was written. All routes are in the active store. The addresses come from the runtime: each network runtime hands the interface the verified direct IPv4 paths of its control connections and the relay hosts in use (Interface::set_underlay, refreshed every dial round); relay names are resolved when the rules are applied. ExitHostRules::needs_bypass (true only on Windows) gates it, so Linux and macOS plans never carry or re-apply on path changes. ExitHostPlan gains `bypass` and `bypass_hosts`; networks leaving forget their entry. Limits: a path that appears after the last apply goes through the tunnel until the next apply; data-plane-only addresses are not collected separately (the data links ride the same iroh paths). Nothing was run on Windows. Checks: cargo fmt --check, cargo clippy --locked --workspace --all-targets -D warnings and cargo test --locked --workspace --all-targets passed on macOS; scripts and ordering are unit-tested with an injected runner and resolver, and Interface::set_underlay with the mock host. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
637915600e |
Exit nodes on Windows: offer through WinNAT; using is refused
Windows reported exit nodes as unsupported. The offering side now creates one WinNAT object per offered range (New-NetNat, named tsunagi-exit:<if>:<range>), prunes this interface's stale ones, reads (never writes) IPv4 forwarding of the overlay interface, and removes everything on clear. All values are single-quoted PowerShell literals. The using side is deliberately not implemented: Windows has no per-user or per-process routing, so the agent's own QUIC/relay traffic cannot be kept out of a default route through the overlay and would loop. It reports that reason and installs no route. The CLI/tray forwarding hint and the kernel-forwarding warning name the Windows command; docs/exit-node.md has a Windows section. Checks: cargo fmt --check, cargo clippy --locked --workspace --all-targets -D warnings and cargo test --locked --workspace --all-targets passed on macOS. The script builders and plan logic are unit-tested with an injected runner on every platform; nothing was run against a real Windows host or cross-compiled (no Windows target installed). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |