amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
4.47k stars 291 forks source link

[BUG] AWG config parsing on iOS #680

Closed danpashin closed 6 months ago

danpashin commented 6 months ago

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):

danpashin commented 6 months ago

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

danpashin commented 6 months ago

Reopening as I've investigated some more and found allowedIPs struct field now contains empty string

Screenshot 2024-03-11 at 21 31 31
danpashin commented 6 months ago

Fixed by #686

vgrebenschikov commented 6 months ago

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

pokamest commented 6 months ago

@vgrebenschikov we will upload new release to TestFlight soon