This guide assumes you already have the configuration file for AmneziaWG that you wish to run on your Keenetic router.
KeeneticOS supports the AmneziaWG protocol starting from version 4.2. Specifically, KeeneticOS 4.2.1 allows importing the AmneziaWG configuration as a standard WireGuard configuration. You can further adjust the asc parameters (Jc, Jmin, Jmax, S1, S2, H1, H2, H3, H4) through the KeeneticOS command line interface (CLI).
Make sure your router is running an updated version of the operating system.
Go to System Settings → Component options → WireGuard VPN → Ensure it’s Installed.
Navigate to Other Connections → WireGuard → Upload from a file → Select your AmneziaWG config file (*.conf).
In the WireGuard list, select your newly imported connection and check Use for accessing the internet. Save the changes.
This will either be the name of your *.conf file or the name you assigned during import.
Click the gear icon in the top-right corner → Command line.
Type 'show interface' and click Send request.
Look for your connection’s name under the 'description' parameter. Adjacent to it, you’ll find the 'interface-name' parameter. This is what you’ll need.
Open your AmneziaWG configuration file and locate the values for Jc, Jmin, Jmax, S1, S2, H1, H2, H3, and H4.
Now that you have the interface name and the asc values from the AmneziaWG config file (*.conf), replace the placeholder values with your own and remove the curly braces:
interface {interface-name} wireguard asc {jc} {jmin} {jmax} {s1} {s2} {h1} {h2} {h3} {h4}
If your interface name is Wireguard1 and your asc parameters are 3 40 80 35 90 129283290 8726729867 194782156 543347908, the final string would look like:
interface Wireguard1 wireguard asc 3 40 80 35 90 129283290 8726729867 194782156 543347908
Paste the string into the CLI and click Send request.
The last step is to configure the connection policies for your devices under the Connection Priorities section.
By following these steps, you’ll have successfully configured your Keenetic router to use the AmneziaWG protocol for VPN connections.
Here is the official Amnezia guide for KeeneticOS in Russian with images: https://docs.amnezia.org/documentation/instructions/keenetic-os-awg/