[GH-ISSUE #3401] [iOS][5.1.0.6] AWG 3.1: connected but no traffic — path-update loop rebinds UDP socket every 2–3 s (works in 5.0.3.0 and AmneziaWG) #3248

Open
opened 2026-11-07 17:58:05 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cool-matter99 on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3401

Summary

On iOS, AmneziaVPN 5.1.0.6 connects with an AWG 3.1 profile (handshake confirmed) but no traffic passes. The same profile works in AmneziaVPN 5.0.3.0 and in the AmneziaWG app on the same phone.

The tunnel log shows a loop: every 2–3 seconds the network extension handles a "network change", re-applies the endpoint config and rebinds the UDP socket. The interface list does not change between these events.

Environment

Fails Works Works
App AmneziaVPN 5.1.0.6 (ac175c8a8) AmneziaVPN 5.0.3.0 AmneziaWG (App Store)
Device / iOS iPhone, iOS 26.6.2 iPhone, iOS 27.2 same iPhone as "Fails", iOS 26.6.2
Network LTE (Russian mobile carrier) LTE, same carrier LTE, same carrier
Profile same AWG 3.1 profile (self-hosted server, MTU 1280) same same
  • The server is a self-hosted AmneziaWG 3.1 server (amneziawg-go). The client receives the handshake response. On the server, the peer's transfer stops after ~16 KB.
  • In 5.1.0.6, a profile to a server inside the same country works. Only the server abroad fails. This matches the socket rebind loop: each rebind creates a new UDP flow, and new flows to foreign addresses can be filtered on mobile networks. This part is a hypothesis.

Steps to reproduce

  1. On iOS 26.6.2, install AmneziaVPN 5.1.0.6.
  2. Import an AWG 3.1 profile (vpn://).
  3. Connect over LTE.
  4. Open any website.

Expected: traffic passes, as in 5.0.3.0 and in AmneziaWG.
Actual: status is "Connected" and the handshake is confirmed, but no websites load.

Tunnel log (excerpt, redacted)

19:34:14 WG: peer(q6Ht…) - Received handshake response
19:34:16 WG: Observed first handshake at last_handshake_time_sec=...
19:34:18 WG: Network change detected with satisfied route and interface order [pdp_ip0, pdp_ip0, utun8]
19:34:18 WG: Path update state: state=started(...) everHadHandshake=true lastNetworkSettingsUpdateAt=2026-11-04 16:34:14 +0000
19:34:18 WG: peer(q6Ht…) - UAPI: Updating endpoint
19:34:18 WG: UAPI: Updating h1..h4 / s1..s4 padding, header protection key
19:34:18 WG: Routine: receive incoming v4 - stopped
19:34:18 WG: UDP bind has been updated
19:34:18 WG: Routine: receive incoming v4 - started
19:34:18 WG: peer(q6Ht…) - Sending keepalive packet
19:34:21 WG: Network change detected ... [pdp_ip0, pdp_ip0, utun8]   <- same block repeats
19:34:24 ...                                                          <- every 2–3 s
19:34:26 ...
19:34:27 ...
19:34:30 ...

lastNetworkSettingsUpdateAt does not change, so the app does not re-apply network settings. The path updates come from NWPathMonitor. On each update, WireGuardAdapter.didReceivePathUpdate (amneziawg-apple v3.1.4) calls wgSetConfig and wgBumpSockets.

Analysis

  • The two app versions use the same awg-apple/3.1.4 (see conanfile.py). The adapter code is the same.
  • One build difference: the awg-apple recipe in 5.1.0.6 uses go/1.27.1 (5.0.3.0 uses go/1.26.0).
  • The AmneziaWG app on the same phone and iOS version works with the same profile (I did not collect its log). The cause is therefore in the 5.1.0.6 build or the app shell, not in iOS alone.
  • I did not find what triggers the repeated path updates in 5.1.0.6.

Possible fix

In didReceivePathUpdate, skip wgSetConfig and wgBumpSockets when the path has not changed. For example, compare availableInterfaces and the status with the last path, and ignore the tunnel's own utun* interface.

Originally created by @cool-matter99 on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3401 ## Summary On iOS, AmneziaVPN **5.1.0.6** connects with an AWG 3.1 profile (handshake confirmed) but no traffic passes. The same profile works in AmneziaVPN **5.0.3.0** and in the **AmneziaWG** app on the same phone. The tunnel log shows a loop: every 2–3 seconds the network extension handles a "network change", re-applies the endpoint config and rebinds the UDP socket. The interface list does not change between these events. ## Environment | | Fails | Works | Works | |---|---|---|---| | App | AmneziaVPN 5.1.0.6 (`ac175c8a8`) | AmneziaVPN 5.0.3.0 | AmneziaWG (App Store) | | Device / iOS | iPhone, iOS 26.6.2 | iPhone, iOS 27.2 | same iPhone as "Fails", iOS 26.6.2 | | Network | LTE (Russian mobile carrier) | LTE, same carrier | LTE, same carrier | | Profile | same AWG 3.1 profile (self-hosted server, MTU 1280) | same | same | - The server is a self-hosted AmneziaWG 3.1 server (amneziawg-go). The client receives the handshake response. On the server, the peer's transfer stops after ~16 KB. - In 5.1.0.6, a profile to a server inside the same country works. Only the server abroad fails. This matches the socket rebind loop: each rebind creates a new UDP flow, and new flows to foreign addresses can be filtered on mobile networks. This part is a hypothesis. ## Steps to reproduce 1. On iOS 26.6.2, install AmneziaVPN 5.1.0.6. 2. Import an AWG 3.1 profile (`vpn://`). 3. Connect over LTE. 4. Open any website. **Expected:** traffic passes, as in 5.0.3.0 and in AmneziaWG. **Actual:** status is "Connected" and the handshake is confirmed, but no websites load. ## Tunnel log (excerpt, redacted) ``` 19:34:14 WG: peer(q6Ht…) - Received handshake response 19:34:16 WG: Observed first handshake at last_handshake_time_sec=... 19:34:18 WG: Network change detected with satisfied route and interface order [pdp_ip0, pdp_ip0, utun8] 19:34:18 WG: Path update state: state=started(...) everHadHandshake=true lastNetworkSettingsUpdateAt=2026-11-04 16:34:14 +0000 19:34:18 WG: peer(q6Ht…) - UAPI: Updating endpoint 19:34:18 WG: UAPI: Updating h1..h4 / s1..s4 padding, header protection key 19:34:18 WG: Routine: receive incoming v4 - stopped 19:34:18 WG: UDP bind has been updated 19:34:18 WG: Routine: receive incoming v4 - started 19:34:18 WG: peer(q6Ht…) - Sending keepalive packet 19:34:21 WG: Network change detected ... [pdp_ip0, pdp_ip0, utun8] <- same block repeats 19:34:24 ... <- every 2–3 s 19:34:26 ... 19:34:27 ... 19:34:30 ... ``` `lastNetworkSettingsUpdateAt` does not change, so the app does not re-apply network settings. The path updates come from `NWPathMonitor`. On each update, `WireGuardAdapter.didReceivePathUpdate` (amneziawg-apple v3.1.4) calls `wgSetConfig` and `wgBumpSockets`. ## Analysis - The two app versions use the same `awg-apple/3.1.4` (see `conanfile.py`). The adapter code is the same. - One build difference: the `awg-apple` recipe in 5.1.0.6 uses `go/1.27.1` (5.0.3.0 uses `go/1.26.0`). - The AmneziaWG app on the same phone and iOS version works with the same profile (I did not collect its log). The cause is therefore in the 5.1.0.6 build or the app shell, not in iOS alone. - I did not find what triggers the repeated path updates in 5.1.0.6. ## Possible fix In `didReceivePathUpdate`, skip `wgSetConfig` and `wgBumpSockets` when the path has not changed. For example, compare `availableInterfaces` and the status with the last path, and ignore the tunnel's own `utun*` interface.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3248
No description provided.