Decoding an AmneziaVPN link, such as vpn://AAAH2Xjan...
, requires specific tools because the encoding scheme is custom and not standard Base64. This response details how to decode these links using Linux command-line tools and Python, how to determine the VPN protocol, and what documentation is available.
vpn://
Link FormatAmneziaVPN uses a custom encoding scheme for its vpn://
links. These links are not always standard Base64-encoded strings and may include additional metadata or proprietary encoding. The vpn://
prefix indicates a custom URI scheme, and the subsequent string is encoded using a method specific to AmneziaVPN. The encoded data typically includes VPN server details, protocol information (e.g., WireGuard, OpenVPN), and authentication keys or other configuration data.
The most reliable method to decode these links is by using the Amnezia Config Decoder & Encoder script, a Python tool designed for this purpose. Here’s how to use it:
Clone the Repository:
bash
git clone https://github.com/andr13/amnezia-config-decoder.git
cd amnezia-config-decoder
Ensure Python is Installed: Make sure you have Python 3.12 or higher installed. You can check your version with:
bash
python3 --version
Run the Decoding Script: To decode the link and save the output to a JSON file, use:
bash
python3 amnezia-config-decoder.py vpn://AAAH2Xjan... -o output.json
Replace vpn://AAAH2Xjan...
with your actual link. The -o output.json
flag saves the decoded configuration to a file named output.json
. If you omit the -o
option, the decoded JSON will be printed to the console.
bash
python3 amnezia-config-decoder.py vpn://AAAH2Xjan...
If the Amnezia Config Decoder script is unavailable, you can attempt to decode the vpn://
link using standard Linux tools. However, keep in mind that the link may not be a pure Base64 string, and this method may only partially work.
Remove the vpn://
Prefix:
bash
echo "vpn://AAAH2Xjan..." | sed 's/vpn:\/\///' > encoded.txt
Attempt Base64 Decoding:
bash
base64 -d encoded.txt > decoded.txt
Inspect the Decoded Output:
bash
cat decoded.txt
If the output is not readable, the string likely uses a custom encoding, and the Amnezia Config Decoder script is the recommended approach.
Once you have decoded the vpn://
link, the output (typically in JSON format) will include details about the VPN configuration, including the protocol. Look for keywords such as:
"protocol": "WireGuard"
"protocol": "OpenVPN"
"protocol": "Shadowsocks"
"protocol": "IKEv2"
"protocol": "AmneziaWG"
"protocol": "XRay"
If the protocol is not explicitly mentioned, analyze the server configuration or consult the AmneziaVPN documentation. For example, WireGuard configurations often include fields like public_key
, private_key
, and dns
, while OpenVPN configurations may include ca
, cert
, and key
.
While the official AmneziaVPN documentation does not explicitly detail the vpn://
link format, the following resources can be helpful:
If decoding fails:
vpn://
link is correctly formatted.After decoding, you might see output like this:
{
"protocol": "WireGuard",
"server": "vpn.example.com",
"port": 51820,
"public_key": "ABC123...",
"private_key": "XYZ789...",
"allowed_ips": "0.0.0.0/0"
}
This indicates the VPN uses the WireGuard protocol.
The vpn://
links used by AmneziaVPN are encoded using a custom scheme. The most reliable way to decode them is by using the Amnezia Config Decoder & Encoder Python script. Once decoded, the JSON output will reveal the VPN protocol and other configuration details. While the official documentation does not detail the vpn://
link format, community resources and the provided script are valuable for decoding and understanding these links.