amnezia-vpn / amnezia-client

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

Config parse issue #860

Open yelgazin opened 3 months ago

yelgazin commented 3 months ago

If not specified PresharedKey in config then ios app could not connect. "error NE: WG: Can't parse WG config...."

To Reproduce

  1. Create client config according wireguard format without PresharedKey value.
  2. Import config into ios app.
  3. Try to connect.
  4. See error in log.

Expected behavior Ignore optional parameters.

pokamest commented 3 months ago

What is platform and app version?

yelgazin commented 3 months ago

Yes, sure: 2024-06-19 22:53:21 info Logging has enabled on AmneziaVPN version 4.5.4.2 "62c33e37" 2024-06-19 22:53:21 info iOS 17.5 (arm64)

owmaker commented 3 months ago

Same problem.

Config (awg0.conf) [Interface] PrivateKey = ******************************************** Address = 10.66.66.3/32 DNS = 1.1.1.1, 1.0.0.1 ###from 1 to 128 Jc = 30 ### < Jmax Jmin = 60 ### < 1280 Jmax = 120 S1 = 55 S2 = 155 H1 = 1953034736 H2 = 752945292 H3 = 3945748733 H4 = 1666444888 [Peer] PublicKey = ******************************************** AllowedIPs = 0.0.0.0/0 Endpoint = *************:*****
Log (AmneziaVPN.log) 2024-06-27 22:13:59 info Logging has enabled on AmneziaVPN version 4.5.4.2 62c33e37 2024-06-27 22:13:59 info iOS 17.5 (arm64) 2024-06-27 22:14:01 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1" 2024-06-27 22:14:01 debug "ConnectToVpn, Server index is 0, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites 2024-06-27 22:14:01 debug IosController::connectVpn "Server 1 (*************) awg" 2024-06-27 22:14:01 debug IosController::vpnStatusDidChange Vpn::Disconnected 2024-06-27 22:14:01 debug IosController::connectVpn : We have received managers: 1 2024-06-27 22:14:01 debug IosController::connectVpn : Using existing tunnel: Server 1 (*************) awg 2024-06-27 22:14:01 debug IosController::startWireGuard 2024-06-27 22:14:01 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred. 2024-06-27 22:14:01 debug Disconnect error info The VPN plugin died unexpectedly. 2024-06-27 22:14:02 debug Vpn::Disconnected 2024-06-27 22:14:02 debug IosController::startTunnel :Server 1 (*************) awgWireGuard : Starting the tunnel succeeded 2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connecting 2024-06-27 22:14:02 debug IosController::vpnStatusDidChange Vpn::Connected 2024-06-27 22:14:02 info NE: Start tunnel 2024-06-27 22:14:02 error NE: WG: Can't parse WG config: The data couldn’t be read because it is missing. 2024-06-27 22:14:03 info NE: App said: {"tunnelId":"","action":"status"} 2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnecting 2024-06-27 22:14:08 debug IosController::vpnStatusDidChange Vpn::Disconnected 2024-06-27 22:14:08 debug Disconnect error NEVPNConnectionErrorDomain 12 The VPN session failed because an internal error occurred. 2024-06-27 22:14:08 debug Disconnect error info The VPN plugin died unexpectedly. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded. 2024-06-27 22:14:12 warning qrc:/ui/qml/Pages2/PageSettingsApplication.qml:1829109480: RangeError: Maximum call stack size exceeded.

Similar configs (for other clients, with different address and keys) work normal at linux, windows and android AmneziaVPN apps.