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.
This commit is contained in:
Aleksandr Bogomiakov committed 2026-11-25 16:57:10 +02:00
1 parent e3e6089d0b
commit 6a0a87e76c
25 files changed
+506 -130

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tsunagi-ui"
version = "1.0.4"
version = "1.0.5"
description = "Shared egui widgets for the tray and Android clients."
edition.workspace = true
rust-version.workspace = true
+9 -5
View File
@@ -4,6 +4,7 @@ use tsunagi::agent::{DATA_CONNECTING, DATA_DISABLED};
#[derive(Copy, Clone, PartialEq, Eq)]
pub(super) enum Channel {
Ready,
Idle,
Waiting,
Error,
Offline,
@@ -19,11 +20,9 @@ impl Device<'_> {
Some(DATA_DISABLED) => Channel::Disabled,
Some(DATA_CONNECTING) => Channel::Waiting,
Some(_) => Channel::Error,
None if self.overlay.is_some_and(|p| p.is_up())
&& !matches!(self.path, None | Some(DataPathReport::None)) =>
{
Channel::Ready
}
None if matches!(self.path, None | Some(DataPathReport::None)) => Channel::Waiting,
None if self.overlay.is_some_and(|p| p.idle) => Channel::Idle,
None if self.overlay.is_some_and(|p| p.is_up()) => Channel::Ready,
None => Channel::Waiting,
}
}
@@ -31,6 +30,7 @@ impl Device<'_> {
match self.channel() {
Channel::Offline => "Offline · peer unreachable",
Channel::Ready => "Ready · encrypted data channel available",
Channel::Idle => "Idle · online, no recent IP traffic",
Channel::Waiting => "Waiting for the encrypted data channel",
Channel::Disabled => "Control only · data transports disabled locally",
Channel::Error => self.data_error.unwrap_or("Data channel error"),
@@ -41,6 +41,7 @@ impl Channel {
pub(super) fn label(self) -> &'static str {
match self {
Self::Ready => "Ready",
Self::Idle => "Idle",
Self::Waiting => "Waiting",
Self::Error => "Error",
Self::Offline => "Offline",
@@ -52,6 +53,8 @@ impl Channel {
match (self, ui.visuals().dark_mode) {
(Self::Ready, true) => Color32::from_rgb(100, 210, 136),
(Self::Ready, false) => Color32::from_rgb(25, 120, 61),
(Self::Idle, true) => Color32::from_rgb(145, 176, 200),
(Self::Idle, false) => Color32::from_rgb(64, 99, 125),
(Self::Waiting, true) => Color32::from_rgb(244, 190, 85),
(Self::Waiting, false) => Color32::from_rgb(150, 94, 8),
(Self::Error, true) => Color32::from_rgb(255, 129, 116),
@@ -67,6 +70,7 @@ impl Channel {
let color = self.color(ui);
let glyph = match self {
Self::Ready => icon::CHECK_CIRCLE,
Self::Idle => icon::MOON,
Self::Error => icon::WARNING,
Self::Offline => icon::MINUS_CIRCLE,
Self::Disabled => icon::PAUSE_CIRCLE,
+20 -7
View File
@@ -29,6 +29,7 @@ fn keyboard_focus_explains_an_icon_and_the_shared_font_contains_the_status_glyph
icon::WARNING,
icon::MINUS_CIRCLE,
icon::PAUSE_CIRCLE,
icon::MOON,
icon::SIGN_OUT,
icon::FINGERPRINT,
icon::HASH,
@@ -163,6 +164,7 @@ fn rotating_the_devices_view_keeps_the_peer_and_fits_traffic_and_states_on_scree
("charlie", "error"),
("delta", "offline"),
("echo", "control only"),
("foxtrot", "idle"),
] {
net.members.push(MemberReport {
endpoint_id: id.into(),
@@ -189,14 +191,24 @@ fn rotating_the_devices_view_keeps_the_peer_and_fits_traffic_and_states_on_scree
});
}
}
net.overlay = Some(OverlayReport {
peers: vec![OverlayPeerReport {
endpoint_id: "alpha".into(),
handshake_secs_ago: Some(2),
tx_bytes: 2048,
rx_bytes: 512,
let mut overlay_peers = vec![OverlayPeerReport {
endpoint_id: "alpha".into(),
handshake_secs_ago: Some(2),
tx_bytes: 2048,
rx_bytes: 512,
..Default::default()
}];
// Only the reachable peer with a healthy path may show Idle. A problem
// or an offline observation takes precedence over quiet IP counters.
overlay_peers.extend(["bravo", "charlie", "delta", "echo", "foxtrot"].map(|id| {
OverlayPeerReport {
endpoint_id: id.into(),
idle: true,
..Default::default()
}],
}
}));
net.overlay = Some(OverlayReport {
peers: overlay_peers,
..Default::default()
});
let draw = |size, time, events| {
@@ -232,6 +244,7 @@ fn rotating_the_devices_view_keeps_the_peer_and_fits_traffic_and_states_on_scree
"bytes (TX / RX)",
"2.0 kB / 512 B",
"Ready",
"Idle",
"Waiting",
"Error",
"Offline",