This Python script converts AmneziaVPN configurations between Base64-encoded strings and JSON format.
Python 3 or higher (tested with Python 3.12)
The script supports both encoding and decoding configurations:
Decoding:
python amnezia-config-decoder.py vpn://AAAGX.. [-o output.json]
vpn://AAAGX..
: The Base64-encoded string containing the AmneziaVPN configuration.-o output.json
: (Optional) Path to the JSON file where the decoded configuration will be saved. If not specified, the configuration will be printed to the console.
Encoding:
python amnezia-config-decoder.py -i input.json
-i input.json
: Path to the JSON file containing the configuration to encode.
Decode a Base64 string to the console:
python amnezia-config-decoder.py vpn://AAAGX..
Decode a Base64 string and save to a file:
python amnezia-config-decoder.py vpn://AAAGX.. -o config.json
Encode a JSON configuration from a file:
python amnezia-config-decoder.py -i config.json
AmneziaVPN uses a custom string encoding scheme to represent configurations. This script replicates encoding and decoding logic without using Qt, allowing you to work with configs in a much readable JSON format.
Contributions are welcome! Please open an issue or pull request if you have any suggestions or bug reports.
This project is licensed under the GPL-3.0 license.