Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Every tunnel is exported twice, but often with broken configurations. #414

Open
bobpaul opened this issue Oct 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bobpaul
Copy link

bobpaul commented Oct 25, 2024

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:

  1. Create several tunnels. On some tunnels, include Amnezia settings, such as Junk Count, but leave others as pure Wireguard configurations.
  2. Click Settings -> Export configurations. A zip file is written to your downloads folder
  3. 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.

@bobpaul bobpaul added the bug Something isn't working label Oct 25, 2024
@bobpaul bobpaul changed the title [BUG] - Problem with app [BUG] - Every tunnel is exported twice, but often with broken configurations. Oct 25, 2024
@merlinuwe
Copy link

Same here with Android 11, 3.5.4 nightly, user space.

@don-dolarson
Copy link

don-dolarson commented Nov 5, 2024

Just updated from 3.5.3 to the latest nightly and it's the same for me. Configs works however, I'm unable to delete the -am duplicates. I click and hold on a tunnel, choose the trash icon and confirm delete but the tunnel still exist.

Android 13/LineageOS 20, root mode.

@zaneschepke
Copy link
Owner

Thanks for this write up. Ill look into implementing this solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants