Repository navigation
Conversation
ad6597b to
596e7f5
Compare
|
🤖 Hermes-Relay automated PR intake Thanks for tackling Android Relay failover! The PR targets Please add the device/Android version used for dogfooding and a screenshot or short recording showing the changed insecure-warning behavior. The stated plain- A maintainer will review the transport-policy exception, device evidence, and implementation once the checks are available. |
Intake follow-upAddressed the automated intake notes: Device / OS
ScreenshotRedacted device proof (Encrypted status chip / not insecure amber; hosts scrubbed):
|
Leave-home / Tailscale device proof (follow-up)Earlier screenshot was taken at home on Secure Link — correct preferred-route behavior, but not the demotion claim. This capture (Wi‑Fi off):
Redacted screenshot (IPs blacked out): committed only on side branch Related dogfood hardening (separate PR): #668 — idle/retarget watchdog no longer |
596e7f5 to
96844fb
Compare
96844fb to
0ae661f
Compare
|
Rebased onto current Leave-home demotion proof was already on the PR earlier; head is now current with Ready for review when CI is green. |
0ae661f to
272af37
Compare
Leave-home stuck the power-tools WS on a sticky Prefer/hysteresis path while chat already used Tailscale. Demote a dead higher-priority active route after a short grace (even without Wi-Fi onLost), and allow plain ws:// to Tailscale/LAN hosts without the insecure-mode toggle so the paired tailnet candidate can attach automatically.
272af37 to
bd2787b
Compare
|
@Codename-11 gentle review request when you have a moment — rebased onto current |

Summary
When leaving home Wi‑Fi, the Android Relay power-tools WebSocket could stay stuck on a preferred Secure Link route that was no longer reachable. Chat already recovered via Tailscale; Relay did not, because sticky Prefer + hysteresis kept publishing the dead higher-priority endpoint (and VPN/cell
onAvailableoften cancelled the network-loss path before a sustained-loss demotion). Separately, plainws://to a paired Tailscale/LAN candidate was blocked unless insecure mode was enabled, even thoughConnectionSecurityalready treats those hosts as overlay-encrypted.This change demotes a preferred active route that stays dead past the existing network-loss grace window and allows trusted-overlay plain WebSocket URLs without the insecure toggle, so Relay can fall through automatically the way chat already does.
Changes
activeEndpoint; after the grace window, mark sustained loss and republish the healthier route. Cancel the job on same/higher-priority publish, unregister, or disconnect.ws://without insecure mode for loopback, private LAN, Tailscale CGNAT (100.64/10), and MagicDNS (.ts.net); keep blocking public cleartext WebSocket URLs.ConnectionManagerwithConnectionSecurity’s overlay model).ConnectionManagerRouteTest; trusted-overlay vs publicws://inConnectionManagerUrlGuardTest.Transport policy note (
wss://vs trusted-overlay plain)AGENTS.md’s Android “
wss://only” line is the default product posture for public/cleartext internet hops. It is not a claim that overlay-encrypted plain schemes are forbidden:ConnectionSecurity.ktalready documents that encrypted includes overlay transports (Tailscale/WireGuard / secure proxy): aws://link over a tailnet is WireGuard-encrypted end-to-end and must not be labelled insecure; only plain scheme with no overlay warns.ws://on private/CGNAT hosts in normal Secure Link + tailnet setups; chat HTTP surfaces follow the same overlay model.ws://relay.example.com/ public unicast still require the existing insecure-mode path.ConnectionSecurityalready treats as overlay-encrypted, so automatic leave-home failover can attach without a manual policy flip.Maintainer call remains welcome if product wants Secure Link
wss://exclusively even on tailnet (would need pairedwsscandidates or a different attach path).Verification
./gradlew :app:testSideloadDebugUnitTest --tests com.hermesandroid.relay.network.relay.ConnectionManagerRouteTest --tests com.hermesandroid.relay.network.relay.ConnectionManagerUrlGuardTest— BUILD SUCCESSFUL1.18.1dogfood build including this changeclients ≥ 1) without enabling insecure mode or manually flipping Prefer.ws://remains blocked without insecure mode (unit coverage).Screenshots
Hosts redacted. Status proof (Encrypted chip / not insecure amber) and route overview chrome:
Leave-home demotion itself is timing/network behavior (covered by
ConnectionManagerRouteTest); the insecure-warning change is primarily the absence of an amber insecure state for trusted-overlay plain sockets (gate + badge alignment), not a new layout.Compatibility / risk
ws://still requires insecure mode. Overlay plain is limited to loopback/private/Tailscale hosts aligned with existingConnectionSecurityoverlay model.ws://gate.Lineage / contributor credit
Checklist
dev, unless this is adev→mainrelease PR or a focused production-tag hotfix PR tomainCHANGELOG.mdis updated for user-visible changes, or N/A is listed above