mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 09:23:10 +00:00
Compare commits
15 Commits
v24.10.4
...
aa17c7a25c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa17c7a25c | ||
|
|
46f0cba90b | ||
|
|
ad4c3e27c0 | ||
|
|
d64ea7b53e | ||
|
|
e075dcb43f | ||
|
|
449988b8e6 | ||
|
|
9591ffdebe | ||
|
|
3498354348 | ||
|
|
f4c13f262d | ||
|
|
6164b8e8d3 | ||
|
|
c4e45cd3bc | ||
|
|
ce827121a1 | ||
|
|
1589abe9ec | ||
|
|
8b3f1c1e5d | ||
|
|
9a3f4520b3 |
45
.github/workflows/build-module.yml
vendored
45
.github/workflows/build-module.yml
vendored
@@ -12,18 +12,19 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'OpenWRT version (e.g., 24.10.3)'
|
||||
description: 'OpenWRT version (e.g., 24.10.5)'
|
||||
required: true
|
||||
type: string
|
||||
targets:
|
||||
description: 'Targets (comma-separated, e.g., "stm32,ramips")'
|
||||
required: true
|
||||
description: 'Targets (comma-separated, optional)'
|
||||
required: false
|
||||
type: string
|
||||
subtargets:
|
||||
description: 'Subtargets (comma-separated, e.g., "stm32mp1,mt7621")'
|
||||
required: true
|
||||
description: 'Subtargets (comma-separated, optional)'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
||||
jobs:
|
||||
generate-config:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -38,16 +39,22 @@ jobs:
|
||||
with:
|
||||
node-version: '20.16.0'
|
||||
|
||||
- name: Get OpenWRT version from tag
|
||||
id: get_version
|
||||
- name: Get OpenWRT version from inputs or tag
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
echo "TARGETS=${{ inputs.targets }}" >> $GITHUB_ENV
|
||||
echo "SUBTARGETS=${{ inputs.subtargets }}" >> $GITHUB_ENV
|
||||
elif [ "${{ github.event_name }}" == "workflow_call" ]; then
|
||||
VERSION="${{ inputs.tag_name }}"
|
||||
echo "VERSION=${VERSION#v}" >> $GITHUB_ENV
|
||||
|
||||
if [ -n "${{ inputs.targets }}" ]; then
|
||||
echo "TARGETS=${{ inputs.targets }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
if [ -n "${{ inputs.subtargets }}" ]; then
|
||||
echo "SUBTARGETS=${{ inputs.subtargets }}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
elif [ "${{ github.event_name }}" = "workflow_call" ]; then
|
||||
echo "VERSION=${{ inputs.tag_name }}" >> $GITHUB_ENV
|
||||
|
||||
else
|
||||
echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
||||
fi
|
||||
@@ -174,7 +181,7 @@ jobs:
|
||||
make package/amneziawg-tools/compile V=s
|
||||
|
||||
echo "Build completed. Checking for built packages..."
|
||||
find bin/ -name "*.ipk" | grep -E "(amneziawg|luci-proto-amneziawg|luci-i18n-amneziawg)" | head -10
|
||||
find bin/ -name "*.?pk" | grep -E "(amneziawg|luci-proto-amneziawg|luci-i18n-amneziawg)" | head -10
|
||||
|
||||
- name: Prepare artifacts
|
||||
run: |
|
||||
@@ -185,10 +192,10 @@ jobs:
|
||||
postfix="v${{ matrix.build_env.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
|
||||
|
||||
# Copy built packages
|
||||
find "$SDK_DIR/bin/packages" -name "amneziawg-tools_*.ipk" -exec cp {} awgrelease/amneziawg-tools_${postfix}.ipk \; || echo "amneziawg-tools package not found"
|
||||
find "$SDK_DIR/bin/packages" -name "luci-proto-amneziawg_*.ipk" -exec cp {} awgrelease/luci-proto-amneziawg_${postfix}.ipk \; || echo "luci-proto-amneziawg package not found"
|
||||
find "$SDK_DIR/bin/packages" -name "luci-i18n-amneziawg-ru_*.ipk" -exec cp {} awgrelease/luci-i18n-amneziawg-ru_${postfix}.ipk \; || echo "luci-i18n-amneziawg-ru package not found"
|
||||
find "$SDK_DIR/bin/targets" -name "kmod-amneziawg_*.ipk" -exec cp {} awgrelease/kmod-amneziawg_${postfix}.ipk \; || echo "kmod-amneziawg package not found"
|
||||
find "$SDK_DIR/bin/packages" -name "amneziawg-tools*.?pk" -exec sh -c 'file="$1"; postfix="$2"; ext="${file##*.}"; cp "$file" "awgrelease/amneziawg-tools_${postfix}.${ext}"' _ {} "${postfix}" \; || echo "amneziawg-tools package not found"
|
||||
find "$SDK_DIR/bin/packages" -name "luci-proto-amneziawg*.?pk" -exec sh -c 'file="$1"; postfix="$2"; ext="${file##*.}"; cp "$file" "awgrelease/luci-proto-amneziawg_${postfix}.${ext}"' _ {} "${postfix}" \; || echo "luci-proto-amneziawg package not found"
|
||||
find "$SDK_DIR/bin/packages" -name "luci-i18n-amneziawg-ru*.?pk" -exec sh -c 'file="$1"; postfix="$2"; ext="${file##*.}"; cp "$file" "awgrelease/luci-i18n-amneziawg-ru_${postfix}.${ext}"' _ {} "${postfix}" \; || echo "luci-i18n-amneziawg-ru package not found"
|
||||
find "$SDK_DIR/bin/targets" -name "kmod-amneziawg*.?pk" -exec sh -c 'file="$1"; postfix="$2"; ext="${file##*.}"; cp "$file" "awgrelease/kmod-amneziawg_${postfix}.${ext}"' _ {} "${postfix}" \; || echo "kmod-amneziawg package not found"
|
||||
|
||||
echo "Built packages:"
|
||||
ls -la awgrelease/
|
||||
@@ -196,5 +203,5 @@ jobs:
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: awgrelease/*.ipk
|
||||
files: awgrelease/*.?pk
|
||||
tag_name: v${{ matrix.build_env.tag }}
|
||||
|
||||
26
README.md
26
README.md
@@ -1,7 +1,9 @@
|
||||

|
||||
|
||||
# Пакеты amneziawg для роутеров с прошивкой OpenWRT
|
||||
|
||||
## Автоматическая настройка AmneziaWG для OpenWRT версии 23.05.0 и более новых
|
||||
1) Если ваш роутер обладает достаточным объмом доступной RAM, рекомендую воспользоваться скриптом, описанным ниже, только для установки нужных пакетов, а для точечной маршрутизации траффика в туннель использовать podkop от пользователя [@itdoginfo](https://github.com/itdoginfo) - тут в [документации](https://podkop.net/docs/tunnels/awg_settings/) описан процесс настройки
|
||||
1) Если ваш роутер обладает достаточным объмом доступной ROM, рекомендую воспользоваться скриптом, описанным ниже, только для установки нужных пакетов, а для точечной маршрутизации траффика в туннель использовать podkop от пользователя [@itdoginfo](https://github.com/itdoginfo) - тут в [документации](https://podkop.net/docs/tunnels/awg_settings/) описан процесс настройки
|
||||
|
||||
2) Если вам нужно только установить пакеты, я добавил скрипт amneziawg-install - он автоматически скачает пакеты из этого репозитория под ваше устройство (только для стабильной версии OpenWRT), а также предложит сразу настроить интерфейс с протоколом AmneziaWG. Если пользователь согласится, нужно будет ввести параметры конфига, которые запросит скрипт. При этом скрипт создаст интерфейс, настроит для него правила фаерволла, а также **включит перенаправление всего траффика через тунель AmneziaWG** (установит в настройках Peer галочку Route Allowed IPs).
|
||||
Для запуска скрипта подключитесь к роутеру по SSH, введите команду и следуйте инструкциям на экране:
|
||||
@@ -9,7 +11,7 @@
|
||||
sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)
|
||||
```
|
||||
|
||||
3) Кроме того для автоматической настройки также можно использовать [скрипт](https://github.com/itdoginfo/domain-routing-openwrt) от пользователя [@itdoginfo](https://github.com/itdoginfo). Этот скрипт позволяет автоматически скачать нужные пакеты из собранных здесь и настроить [точечный обход блокировок по доменам](https://habr.com/ru/articles/767464/). Подойдёт, если у вас слабый роутер с недостаточным объёмом RAM для установки podkop-a и зависимостей
|
||||
3) Кроме того для автоматической настройки также можно использовать [скрипт](https://github.com/itdoginfo/domain-routing-openwrt) от пользователя [@itdoginfo](https://github.com/itdoginfo). Этот скрипт позволяет автоматически скачать нужные пакеты из собранных здесь и настроить [точечный обход блокировок по доменам](https://habr.com/ru/articles/767464/). Подойдёт, если у вас слабый роутер с недостаточным объёмом ROM для установки podkop-a и зависимостей
|
||||
|
||||
## Сборка пакетов для всех устройств, поддерживающих OpenWRT
|
||||
В репозиторий добавлен скрипт, который парсит данные о поддерживаемых платформах со страницы OpenWRT и автоматически запускает сборку пакетов AmneziaWG для всех устройств.
|
||||
@@ -21,10 +23,12 @@ sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/re
|
||||
5) [23.05.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.4)
|
||||
6) [23.05.5](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.5)
|
||||
7) AWG-2.0 [23.05.6](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.6)
|
||||
8) [24.10.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0)
|
||||
9) [24.10.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.1)
|
||||
10) [24.10.2](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.2)
|
||||
8) [24.10.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0) ([AWG-2.0 для 24.10.0](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.0) из форка, если кому-то понадобится)
|
||||
9) [24.10.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.1) ([AWG-2.0 для 24.10.1](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.1) из форка)
|
||||
10) [24.10.2](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.2) ([AWG-2.0 для 24.10.2](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.2) из форка)
|
||||
11) AWG-2.0 [24.10.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.3)
|
||||
12) AWG-2.0 [24.10.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.4)
|
||||
13) AWG-2.0 [24.10.5](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.5)
|
||||
|
||||
Также запускал сборку для версии [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), но там для двух платформ сборка завершилась ошибкой. Так как это достаточно старая версия OpenWRT, я не стал разбираться, в чем проблема.
|
||||
|
||||
@@ -67,7 +71,7 @@ AWG 2.0 можно собрать под определённую платфор
|
||||
- А также всем, кто приносил полезные примеры в личку и в [ишью](https://github.com/Slava-Shchipunov/awg-openwrt/issues/39), отписывались в комменты к PR с имплементацией о возникших багах и проблемах ❤️
|
||||
|
||||
## Automatic configuration of AmneziaWG for OpenWRT version 23.05.0 and newer
|
||||
1) If your router has enough available RAM, I recommend using the script described below only to install the necessary packages, and use podkop from user [@itdoginfo](https://github.com/itdoginfo) for selective traffic routing into the tunnel - the setup process is described in the [documentation](https://podkop.net/docs/tunnels/awg_settings/)
|
||||
1) If your router has enough available ROM, I recommend using the script described below only to install the necessary packages, and use podkop from user [@itdoginfo](https://github.com/itdoginfo) for selective traffic routing into the tunnel - the setup process is described in the [documentation](https://podkop.net/docs/tunnels/awg_settings/)
|
||||
|
||||
2) If you only need to install packages, I added the amneziawg-install script - it will automatically download packages from this repository for your device (only for the stable version of OpenWRT), and also offer to immediately configure the interface with the AmneziaWG protocol. If the user agrees, you will need to enter the config parameters that the script will request. The script will create an interface, configure firewall rules for it, and also **enable redirection of all traffic through the AmneziaWG tunnel** (check the Route Allowed IPs box in the Peer settings).
|
||||
To run the script, connect to the router via SSH, enter the command and follow the instructions on the screen:
|
||||
@@ -75,7 +79,7 @@ To run the script, connect to the router via SSH, enter the command and follow t
|
||||
sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)
|
||||
```
|
||||
|
||||
3) In addition, for automatic configuration you can also use the [script](https://github.com/itdoginfo/domain-routing-openwrt) from user [@itdoginfo](https://github.com/itdoginfo). This script allows you to automatically download the necessary packages from those collected here and configure [point-by-point bypass of blocking by domains](https://habr.com/ru/articles/767464/) (instructions in Russian). Suitable if you have a weak router with insufficient RAM to install podkop and its dependencies
|
||||
3) In addition, for automatic configuration you can also use the [script](https://github.com/itdoginfo/domain-routing-openwrt) from user [@itdoginfo](https://github.com/itdoginfo). This script allows you to automatically download the necessary packages from those collected here and configure [point-by-point bypass of blocking by domains](https://habr.com/ru/articles/767464/) (instructions in Russian). Suitable if you have a weak router with insufficient ROM to install podkop and its dependencies
|
||||
|
||||
# Building packages for all devices that support OpenWRT
|
||||
A script has been added to the repository that parses data on supported platforms from the OpenWRT page and automatically starts building AmneziaWG packages for all devices.
|
||||
@@ -87,10 +91,12 @@ At the moment I have collected packages for all devices for OpenWRT versions:
|
||||
5) [23.05.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.4)
|
||||
6) [23.05.5](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.5)
|
||||
7) AWG-2.0 [23.05.6](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.6)
|
||||
8) [24.10.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0)
|
||||
9) [24.10.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.1)
|
||||
10) [24.10.2](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.2)
|
||||
8) [24.10.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0) ([AWG-2.0 for 24.10.0](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.0) from fork)
|
||||
9) [24.10.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.1) ([AWG-2.0 for 24.10.1](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.1) from fork)
|
||||
10) [24.10.2](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.2) ([AWG-2.0 for 24.10.2](https://github.com/yanjore/awg-openwrt/releases/tag/v24.10.2) from fork)
|
||||
11) AWG-2.0 [24.10.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.3)
|
||||
12) AWG-2.0 [24.10.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.4)
|
||||
13) AWG-2.0 [24.10.5](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.5)
|
||||
|
||||
I also ran the build for version [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), but the build ended with an error for two platforms. Since this is a fairly old version of OpenWRT, I did not bother to figure out what the problem was.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=amneziawg-tools
|
||||
PKG_VERSION:=1.0.20250903
|
||||
PKG_VERSION:=1.0.20260223
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=kmod-amneziawg
|
||||
PKG_VERSION:=1.0.20251005
|
||||
PKG_VERSION:=1.0.20260210
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
|
||||
# Latest commit from master branch as of 2025-10-05
|
||||
PKG_SOURCE_VERSION:=876bf7571e47e349d0e86b70c244330b470d9642
|
||||
# Version: latest stable release tag
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
MAKE_PATH:=src
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ LUCI_DESCRIPTION:=Provides support and Web UI for AmneziaWG VPN
|
||||
PKG_VERSION:=2.0.4
|
||||
LUCI_DEPENDS:=+amneziawg-tools +ucode +luci-lib-uqr +resolveip
|
||||
LUCI_PKGARCH:=all
|
||||
PKGARCH:=all
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@ function generateDescription(name, texts) {
|
||||
}
|
||||
|
||||
function buildSVGQRCode(data, code) {
|
||||
// pixel size larger than 4 clips right and bottom edges of complex configs
|
||||
// pixel size 3 for mobile browser
|
||||
const options = {
|
||||
pixelSize: 4,
|
||||
pixelSize: 3,
|
||||
whiteColor: 'white',
|
||||
blackColor: 'black'
|
||||
};
|
||||
@@ -934,7 +934,7 @@ return network.registerProtocol('amneziawg', {
|
||||
}, [
|
||||
E('div', {
|
||||
'class': 'qr-code',
|
||||
'style': 'width:320px;flex:0 1 320px;text-align:center'
|
||||
'style': 'text-align:center'
|
||||
}, [
|
||||
E('em', { 'class': 'spinning' }, [ _('Generating QR code…') ])
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user