mirror of
https://github.com/amnezia-vpn/amneziawg-android.git
synced 2026-10-13 21:34:07 +00:00
[PR #90] backend: track connection status per tunnel and detect reconnects #95
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-android#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-android/pull/90
Author: @erophey7
Created: 8/8/2026
Status: 🔄 Open
Base:
master← Head:fix/multi-tunnel-status📝 Commits (1)
104b3debackend: track connection status per tunnel and detect reconnects📊 Changes
4 files changed (+62 additions, -45 deletions)
View changed files
📝
tunnel/src/main/java/org/amnezia/awg/backend/AwgQuickBackend.java(+47 -32)📝
tunnel/src/main/java/org/amnezia/awg/backend/GoBackend.java(+1 -1)📝
tunnel/src/main/java/org/amnezia/awg/backend/StatusCallback.java(+4 -2)📝
ui/src/main/java/org/amnezia/awg/model/TunnelManager.kt(+10 -10)📄 Description
What
Track connection status per tunnel and detect reconnects in the Android backend.
Why
The status polling job in
AwgQuickBackendonly tracked a singlecurrentTunnel, so with multiple tunnels enabled... the first tunnel was left without handshake monitoring and its status stuck at CONNECTING forever. The globalStatusCallbackdid not carry the tunnel identity, soTunnelManagerapplied the status update to the first UP tunnel in the list instead of the tunnel it belonged to.Changes
StatusCallbacknow carries theTunnelthe event belongs to.AwgQuickBackendpolls all running tunnels (runningConfigs) in a single loop, remembers each tunnel's last handshake time, and:TunnelManagerroutes the status update to the exact tunnel by name.GoBackendadapted to the new callback signature.Also fixed a latent
ConcurrentModificationExceptionin the status snapshot path.Testing performed
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.