[GH-ISSUE #680] [BUG] AWG config parsing on iOS #179

Closed
opened 2026-10-13 20:14:38 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @danpashin on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/680

Describe the bug
This error comes from #577. The thing is wgConfigData variable in -[PacketTunnelProvider startWireguard] lacks client_pub_key json value. I don't know yet in what situations this happens but struct decoding fails because of this error. This leads to app being visually connected but it's not.

That was between that PR and dev branch. Now wgConfig struct in -[PacketTunnelProvider startWireguard] has allowedIPs field set to an empty string for some reason. This leads to the same behaviour - app being visually connected but it's not.

I'll see a bit later how exactly this can be fixed.

To Reproduce
Import AWG config and connect. App will show "Connected" state as well as system will show "VPN" badge but it won't be really connected.

Expected behavior
App mustn't pass any invalid json in this part

Smartphone (please complete the following information):

  • Device: iPhone 8
  • Version: 16.6.1
Originally created by @danpashin on GitHub (Mar 11, 2024). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/680 **Describe the bug** ~~This error comes from #577. The thing is `wgConfigData` variable in `-[PacketTunnelProvider startWireguard]` lacks client_pub_key json value. I don't know yet in what situations this happens but struct decoding fails because of this error. This leads to app being visually connected but it's not.~~ That was between that PR and dev branch. Now `wgConfig` struct in `-[PacketTunnelProvider startWireguard]` has `allowedIPs` field set to an empty string for some reason. This leads to the same behaviour - app being visually connected but it's not. I'll see a bit later how exactly this can be fixed. **To Reproduce** Import AWG config and connect. App will show "Connected" state as well as system will show "VPN" badge but it won't be really connected. **Expected behavior** App mustn't pass any invalid json in this part **Smartphone (please complete the following information):** - Device: iPhone 8 - Version: 16.6.1
Author
Owner

@danpashin commented on GitHub (Mar 11, 2024):

Seems like that's invalid in dev branch now...

<!-- gh-comment-id:1989110098 --> @danpashin commented on GitHub (Mar 11, 2024): Seems like that's invalid in dev branch now...
Author
Owner

@danpashin commented on GitHub (Mar 11, 2024):

Reopening as I've investigated some more and found allowedIPs struct field now contains empty string
Screenshot 2024-03-11 at 21 31 31

<!-- gh-comment-id:1989179376 --> @danpashin commented on GitHub (Mar 11, 2024): Reopening as I've investigated some more and found `allowedIPs` struct field now contains empty string <img width="247" alt="Screenshot 2024-03-11 at 21 31 31" src="https://github.com/amnezia-vpn/amnezia-client/assets/11134266/102c6cf6-91c0-47e0-a9fe-f4446e4d7692">
Author
Owner

@danpashin commented on GitHub (Mar 12, 2024):

Fixed by #686

<!-- gh-comment-id:1992367073 --> @danpashin commented on GitHub (Mar 12, 2024): Fixed by #686
Author
Owner

@vgrebenschikov commented on GitHub (Mar 19, 2024):

Still have problems on v4.4.1 and v4.4.2 on iOS - tunnel shown as "Connected" but actually packets did not sent to tunnel interface

while returning back to v4.4.0 fixes the problem

<!-- gh-comment-id:2008259052 --> @vgrebenschikov commented on GitHub (Mar 19, 2024): Still have problems on v4.4.1 and v4.4.2 on iOS - tunnel shown as "Connected" but actually packets did not sent to tunnel interface while returning back to v4.4.0 fixes the problem
Author
Owner

@pokamest commented on GitHub (Mar 19, 2024):

@vgrebenschikov we will upload new release to TestFlight soon

<!-- gh-comment-id:2008268722 --> @pokamest commented on GitHub (Mar 19, 2024): @vgrebenschikov we will upload new release to TestFlight soon
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#179
No description provided.