This project is aimed to update sources of the initial AmneziaWG and make them as close to three upstream projects (luci-proto-wireguard, amneziawg-tools, amneziawg-linux-kernel-module) as possible.
Why? Because it looks like the original repository is abandoned: more than half a year has passed since the last commit and no bugs were fixed while two upstream projects receive updates on a regular basis (at least from the community).
The main differences and objectives:
luci-proto-amneziawg
has been aligned in accordance with luci-proto-wireguard:- AmneziaWG settings tab now have placeholders (default values, if chosen, will mimic classic Wireguard protocol).
- Fixed bug with QR code generation. Please note that the generated QR code will contain AmneziaWG specific information (remove it manually to make it compatible with classic Wireguard).
- Added checkboxes to enable/disable peers.
- Took
luci-proto-wireguard
as the codebase.
amneziawg-tools
has been aligned in accordance with the upstream repo amneziawg-tools:- The package is now compiled based on the upstream repo. Master branch has been chosen as a reference.
- Fixed bug with non-existent
proto_amneziawg_check_installed
method. - Changed temp folders and files to match the protocol name.
- Refactored scripts a bit to make them look more
amneziish
.
kmod-amneziawg
is now compiled totally based on the upstream amneziawg-linux-kernel-module repo. Master branch has been chosen as a reference.
Everything seems to work fine. No major problems have been detected or reported so far.
Kudos to another fork and its Author (@defanator) for the build pipelines: https://github.com/defanator/amneziawg-openwrt Please refer to the original manual as well.
Side note: the build process is not hard at all, but requires some attention and basic knowledge.
General steps:
- Get parameters for your router:
- OpenWRT version:
SNAPSHOT
or release (e.x.23.05.5
). Can be found on theStatus -> Overview
page (Firmware Version
parameter value). - CPU/package architecture: run
opkg info kernel
in console and check theArchitecture
value (e.x.aarch64_cortex-a53
) or consult OpenWRT router database. - Target: can be found on the
Status -> Overview
page. The first part (before the slash) of theTarget Platform
value. - Subtarget: can be found on the
Status -> Overview
page. You guessed it! The second part (after the slash) of theTarget Platform
value. - Vermagic: run
opkg info kernel
in console check hash after the kernel version of theVersion
value. E.x. if the value equals to6.6.52~f58afd3748410d3b1baa06a466d6682-r1
then vermagic equals tof58afd3748410d3b1baa06a466d6682
. You can also choose:auto
: the script will get vermagic value from the OpenWrt site.any
: the script will not check the variable.
- OpenWRT version:
- Make a fork of this repo.
- Optional: update/change commit hashes (
PKG_SOURCE_VERSION
variable) of the upstream repos inamneziawg-tools/Makefile
andkmod-amneziawg/Makefile
file. Remember thatamneziawg-tools
features should matchamneziawg-linux-kernel-module
features, i.e. choose two corresponding commits in both repos. - Go to Actions (enable them is needed).
- Choose
Build OpenWrt toolchain cache
, put your router parameters (from step 1) in theRun workflow
menu and run the job. - It will take ~2-2.5 hours to build the cache. So get some cookies, tea, your favorite book and wait.
- After the cache has been created, choose
Build AmneziaWG from cache
job, put the same parameters in theRun workflow
menu and run it. - It will take ~10-15 minutes to build the binaries. After the process is finished you can download them in the job's artifacts section (bottom of the page).
- Unpack the archive, and install:
- Via WebInterface (LuCi):
- Go to
System -> Software
menu. - Press
Upload Package...
- Select kmod-amneziawg .ipk file.
- Confirm installation.
- Repeat those steps for amneziawg-tools .ipk file and then luci-proto-amneziawg .ipk file.
- Go to
- Via console:
- Transfer files into the router.
- Run
opkg install {path to the kmod-amneziawg .ipk}
- Run
opkg install {path to the amneziawg-tools .ipk}
- Run
opkg install {path to the luci-proto-amneziawg .ipk}
- Reboot router or run
/etc/init.d/network restart
command in the console. - Congratulations - you now have AmneziaWG installed on your router. Go to
Network -> Interfaces
page, pressAdd new interface..
and selectAmneziaWG
as protocol.
*Sometimes is is required to clean the browser's cache to see the new protocol available in the OpenWRT.