[GH-ISSUE #476] Restoring from backup inserts "garbage" into the servers list #150

Closed
opened 2026-10-13 20:13:45 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @louis-ad on GitHub (Dec 22, 2023).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/476

Describe the bug
Restoring from backup inserts "garbage" into the servers list, instead of a server description like "ShadowSocks" under the title, I see part of the contents of the backup file, specifically strings that look like the OpenVPN configuration. I can't delete the server from the app either, the only option is to do a full reset.

To Reproduce
Steps to reproduce the behavior:

  1. With a valid configuration that has OpenVPN settings, go to Settings and Backup, Make a Backup file.
  2. Reset the application.
  3. Open the application, "I have the data to connect", "Open config file, key, or QR code".
  4. Select "File with connection settings or backup", and choose the backup file created in step 1.
  5. If you select "Show content", you can see that instead of showing the backup file as a JSON structure, the app has created a new structure, and the contents of the backup file has been inserted as a JSON node inside containers[0].openvpn.last_config.config.
  6. If you go back to the main screen, instead of a server description like "ShadowSocks" under the title, you see part of the contents of the configuration.
  7. Going to Settings Icon (which is only available only after I've setup the app) -> Backup -> Restore from Backup also doesn't bring the expected results.

Expected behavior
Restoring from backup will give me the expected list of servers, and a functioning application.

Smartphone (please complete the following information):

  • Device: Google Pixel 7
  • OS: Android 13
  • Version 4.1.1.0

Server (please complete the following information):

  • OS: Ubuntu 22.04

Additional context
The problem is in ConfigTypes.checkConfigFormat(): if I give it an Amnezia backup file that has an openvpn configuration embedded, it will return ConfigTypes::OpenVpn instead of ConfigTypes::Amnezia.

Originally created by @louis-ad on GitHub (Dec 22, 2023). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/476 **Describe the bug** Restoring from backup inserts "garbage" into the servers list, instead of a server description like "ShadowSocks" under the title, I see part of the contents of the backup file, specifically strings that look like the OpenVPN configuration. I can't delete the server from the app either, the only option is to do a full reset. **To Reproduce** Steps to reproduce the behavior: 1. With a valid configuration that has OpenVPN settings, go to Settings and Backup, Make a Backup file. 2. Reset the application. 3. Open the application, "I have the data to connect", "Open config file, key, or QR code". 4. Select "File with connection settings or **backup**", and choose the backup file created in step 1. 5. If you select "Show content", you can see that instead of showing the backup file as a JSON structure, the app has created a new structure, and the contents of the backup file has been inserted as a JSON node inside `containers[0].openvpn.last_config.config`. 6. If you go back to the main screen, instead of a server description like "ShadowSocks" under the title, you see part of the contents of the configuration. 7. Going to Settings Icon (which is only available only after I've setup the app) -> Backup -> Restore from Backup also doesn't bring the expected results. **Expected behavior** Restoring from backup will give me the expected list of servers, and a functioning application. **Smartphone (please complete the following information):** - Device: Google Pixel 7 - OS: Android 13 - Version 4.1.1.0 **Server (please complete the following information):** - OS: Ubuntu 22.04 **Additional context** The problem is in `ConfigTypes.checkConfigFormat()`: if I give it an Amnezia backup file that has an openvpn configuration embedded, it will return `ConfigTypes::OpenVpn` instead of `ConfigTypes::Amnezia`.
Author
Owner

@Nethius commented on GitHub (Feb 20, 2025):

check latest release

<!-- gh-comment-id:2671755531 --> @Nethius commented on GitHub (Feb 20, 2025): check latest release
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#150
No description provided.