Describe the bug
The zip file created with Settings -> Export configs includes every tunnel twice, once with "-am" appended to the name and once with "-wg" appended to the name.
Smartphone (please complete the following information):
Device: Samsung Galaxy S10e
Android Version: Android 12
App Version 3.5.2
Backend: Userspace
To Reproduce
Steps to reproduce the behavior:
Create several tunnels. On some tunnels, include Amnezia settings, such as Junk Count, but leave others as pure Wireguard configurations.
Click Settings -> Export configurations. A zip file is written to your downloads folder
Open the Zip file that's created. Observe:
a. For every pure wireguard tunnel, there's 2 *.conf files, one named ${tunnel}-wg.conf and one named ${tunnel}-am.conf. These two files are identical.
b. For every Amnezia tunnel (tunnels with custom H* and/or S* values) there's also 2 *.conf files. The ${tunnel}-wg.conf file does not contain the Amnezia options and is not a valid configuration file. Only the ${tunnel}-am.conf file is useful.
c. For Wireguard tunnels with custom J* values, two *.conf files are created. The ${tunnel}-wg.conf file has the Jc, Jmin, and Jmax entries removed. The ${tunnel}-am.conf file retains the settings for Junk packets.
Expected behavior
a. Only 1 file should be created named ${tunnel}.conf for tunnels that are purely Wireguard tunnels. These files can be used unmodified with any Wireguard client (including AmneziaWG).
b. For AmneziaWG tunnels (those with customized H1, H2, H3, H4, S1, or S2 values) only an AmneziaWG client can use this config file. Only 1 file should be created named ${tunnel}.conf.
c. There's some argument for this case. The *-am.conf file with JC=, Jmin=, and Jmax= values will be rejected by a pure Wireguard client. But I'd argue the *-wg.conf file is NOT an export of my configuration, only the *-am.conf file serves as a backup of my WGTunnel configuration for this tunnel.
Additional context
I think maybe 2 separate export options could be provided: Export Configs and Export for Wireguard, where the latter option would only export (a) and (c) tunnels (those that can work with Wireguard) and with an J* values either removed or commented out.
Describe the bug The zip file created with Settings -> Export configs includes every tunnel twice, once with "-am" appended to the name and once with "-wg" appended to the name.
Smartphone (please complete the following information):
To Reproduce Steps to reproduce the behavior:
${tunnel}-wg.conf
and one named${tunnel}-am.conf
. These two files are identical. b. For every Amnezia tunnel (tunnels with customH*
and/orS*
values) there's also 2 *.conf files. The${tunnel}-wg.conf
file does not contain the Amnezia options and is not a valid configuration file. Only the${tunnel}-am.conf
file is useful. c. For Wireguard tunnels with customJ*
values, two *.conf files are created. The${tunnel}-wg.conf
file has theJc
,Jmin
, andJmax
entries removed. The${tunnel}-am.conf
file retains the settings for Junk packets.Expected behavior a. Only 1 file should be created named
${tunnel}.conf
for tunnels that are purely Wireguard tunnels. These files can be used unmodified with any Wireguard client (including AmneziaWG). b. For AmneziaWG tunnels (those with customized H1, H2, H3, H4, S1, or S2 values) only an AmneziaWG client can use this config file. Only 1 file should be created named${tunnel}.conf
. c. There's some argument for this case. The*-am.conf
file withJC=
,Jmin=
, andJmax=
values will be rejected by a pure Wireguard client. But I'd argue the*-wg.conf
file is NOT an export of my configuration, only the*-am.conf
file serves as a backup of my WGTunnel configuration for this tunnel.Additional context I think maybe 2 separate export options could be provided:
Export Configs
andExport for Wireguard
, where the latter option would only export (a) and (c) tunnels (those that can work with Wireguard) and with anJ*
values either removed or commented out.