79 Commits

Author SHA1 Message Date
RTechSn
0c726cacbf Fix Generate Configuration (#36)
* Fix "generate client configuration"

* Add qrencode dependency

* Added client IP and DNS settings in client config generator

* Added Download Config button

* fix
2025-06-26 01:34:20 +07:00
EugeneTM
d91b8929de fix var names in config import (#35)
Исправлены названия переменных для корректного импорта текстовой конфигурации
2025-03-27 21:21:14 +07:00
Slava-Shchipunov
33e363e9d9 feat: disable sync owrt releases 2025-03-13 09:24:17 +07:00
Slava-Shchipunov
3d865a8d4d feat: disable build to snapshots 2025-03-13 09:22:29 +07:00
Slava-Shchipunov
e285146833 docs: fix script link 2024-10-27 20:30:00 +07:00
Slava-Shchipunov
1dd92441aa Feat/add install script (#31)
* feat: add awg install script

* fix: replace curl with wget

* fix: add opkg update run

* feat: add firewall settings

* fix: fix allowed_ips set

* fix: add timeout

* fix: fix peer create

* docs: update readme
2024-10-26 04:36:27 +07:00
Slava-Shchipunov
2de5a7406e Merge pull request #30 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-07 18:16:12 +07:00
Svyatoslav Shchipunov
727d873870 fix: fix run build job 2024-10-07 18:15:24 +07:00
Slava-Shchipunov
e538a4cd3b Merge pull request #29 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-07 18:10:12 +07:00
Svyatoslav Shchipunov
2d0ce4148d fix: fix run build job 2024-10-07 18:09:42 +07:00
Slava-Shchipunov
bdcc13cb62 Merge pull request #28 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 13:11:25 +07:00
Svyatoslav Shchipunov
f4361730a1 fix: fix run build job 2024-10-02 13:10:47 +07:00
Slava-Shchipunov
bde01b77c4 Merge pull request #27 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 13:02:21 +07:00
Svyatoslav Shchipunov
37f4fc71e2 fix: fix run build job 2024-10-02 13:01:50 +07:00
Slava-Shchipunov
12ffd61390 Merge pull request #26 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 12:57:24 +07:00
Svyatoslav Shchipunov
4dc8ea2b6a fix: fix run build job 2024-10-02 12:56:58 +07:00
Slava-Shchipunov
4add339eba Merge pull request #25 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 12:21:44 +07:00
Svyatoslav Shchipunov
e5696ca1e3 fix: fix run build job 2024-10-02 12:20:52 +07:00
Slava-Shchipunov
90508ad0b1 Merge pull request #24 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 12:15:20 +07:00
Svyatoslav Shchipunov
aec74cab7d fix: fix run build job 2024-10-02 12:14:53 +07:00
Slava-Shchipunov
9ae861fe88 Merge pull request #23 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 12:12:04 +07:00
Svyatoslav Shchipunov
77e16b164c fix: fix run build job 2024-10-02 12:11:12 +07:00
Slava-Shchipunov
0ac5434a63 Merge pull request #22 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 12:07:30 +07:00
Svyatoslav Shchipunov
9c44a73425 fix: fix run build job 2024-10-02 12:06:38 +07:00
Slava-Shchipunov
f8d852d9d7 Merge pull request #21 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix uses attribute
2024-10-02 11:46:08 +07:00
Svyatoslav Shchipunov
cd0e27204e fix: fix uses attribute 2024-10-02 11:45:42 +07:00
Slava-Shchipunov
09bbe44557 Merge pull request #20 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix uses attribute
2024-10-02 11:34:19 +07:00
Svyatoslav Shchipunov
811154ea36 fix: fix uses attribute 2024-10-02 11:33:53 +07:00
Slava-Shchipunov
b416e511c3 Merge pull request #19 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix run build job
2024-10-02 11:29:30 +07:00
Svyatoslav Shchipunov
66b6a8f7ce fix: fix run build job 2024-10-02 11:29:03 +07:00
Slava-Shchipunov
521f0626d2 Merge pull request #18 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix release art
2024-10-02 10:58:32 +07:00
Svyatoslav Shchipunov
47c3466084 fix: fix release art 2024-10-02 10:58:02 +07:00
Slava-Shchipunov
8b611ec73c Merge pull request #17 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix build run conditions
2024-10-02 10:53:41 +07:00
Svyatoslav Shchipunov
77ee2bf7cc fix: fix build run conditions 2024-10-02 10:52:39 +07:00
Slava-Shchipunov
3b8de3d5f8 Merge pull request #16 from Slava-Shchipunov/fix/fix-release-sync-workflow
Revert "fix: fix JSON parsing"
2024-10-02 10:33:41 +07:00
Svyatoslav Shchipunov
fa7bf7cfb0 Revert "fix: fix JSON parsing"
This reverts commit 8c467935c4.
2024-10-02 10:32:43 +07:00
Slava-Shchipunov
2b1de64324 Merge pull request #15 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix JSON parsing
2024-10-02 10:29:37 +07:00
Svyatoslav Shchipunov
8c467935c4 fix: fix JSON parsing 2024-10-02 10:29:11 +07:00
Svyatoslav Shchipunov
96b8dddbd1 fix: fix JSON parsing 2024-10-02 10:18:53 +07:00
Slava-Shchipunov
c7be95682f Merge pull request #14 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: add job output
2024-10-02 10:15:19 +07:00
Svyatoslav Shchipunov
128a6054c2 fix: add job output 2024-10-02 10:13:56 +07:00
Slava-Shchipunov
ef86be910a Merge pull request #13 from Slava-Shchipunov/fix/fix-release-sync-workflow
fix: fix job run condition
2024-10-02 10:08:53 +07:00
Svyatoslav Shchipunov
d0727b534e fix: fix job run condition 2024-10-02 10:02:44 +07:00
Slava-Shchipunov
e55641a754 Merge pull request #12 from Slava-Shchipunov/feat/update-gh-actions
feat: add target filter to snapshots
2024-09-23 10:36:19 +07:00
Svyatoslav Shchipunov
922f929ad0 feat: add target filter to snapshots 2024-09-23 10:33:12 +07:00
Slava-Shchipunov
e7c7d2d8a7 Merge pull request #11 from Slava-Shchipunov/feat/update-gh-actions
docs: update README
2024-09-20 17:34:45 +07:00
Svyatoslav Shchipunov
a4dad7e585 docs: update README 2024-09-20 17:33:51 +07:00
Slava-Shchipunov
1b130609a3 Merge pull request #10 from Slava-Shchipunov/feat/update-gh-actions
feat: add x86 generic
2024-09-20 15:27:09 +07:00
Svyatoslav Shchipunov
4c9a389abf feat: add x86 generic 2024-09-20 15:22:32 +07:00
Slava-Shchipunov
78ee14fbf2 Merge pull request #9 from Slava-Shchipunov/feat/update-gh-actions
fix: fix art
2024-09-20 12:13:33 +07:00
Svyatoslav Shchipunov
c0f2e1f908 fix: fix art 2024-09-20 12:05:56 +07:00
Slava-Shchipunov
14397a5914 Merge pull request #8 from Slava-Shchipunov/feat/update-gh-actions
Feat/update gh actions
2024-09-20 11:42:59 +07:00
Svyatoslav Shchipunov
438a18f0d1 feat: add new SNAPSHOT_SUBTARGETS_TO_BUILD 2024-09-20 11:39:20 +07:00
Svyatoslav Shchipunov
bf75542e2b feat: add action to auto create release 2024-09-20 11:38:25 +07:00
Slava-Shchipunov
4dec00bf18 Merge pull request #7 from Slava-Shchipunov/fix/fix-auto-build-to-snapshot
fix: fix release job
2024-09-19 11:33:35 +07:00
Svyatoslav Shchipunov
62aa0be06c fix: fix release job 2024-09-19 11:32:42 +07:00
Slava-Shchipunov
9528b226b1 Merge pull request #6 from Slava-Shchipunov/fix/fix-auto-build-to-snapshot
Fix/fix auto build to snapshot
2024-09-19 09:08:55 +07:00
Svyatoslav Shchipunov
5531cf217f fix: fix delete old release assets 2024-09-19 09:07:57 +07:00
Svyatoslav Shchipunov
8d6795c32c fix: fix check if release file exists 2024-09-19 09:07:08 +07:00
Svyatoslav Shchipunov
51707f91bf feat: add manual workflow run 2024-09-19 08:57:11 +07:00
Slava-Shchipunov
a02fb5219b Merge pull request #5 from Slava-Shchipunov/feat/auto-build-to-snapshot
Feat/auto build to snapshot
2024-09-19 00:48:13 +07:00
Svyatoslav Shchipunov
dda36ebd54 feat: add fail-fast false setting 2024-09-19 00:44:55 +07:00
Svyatoslav Shchipunov
2af0ca1e3a feat: add schedule to run 2024-09-19 00:43:44 +07:00
Svyatoslav Shchipunov
fe0b836b26 feat: limit supported subtargets 2024-09-18 23:50:14 +07:00
Svyatoslav Shchipunov
755fa35dd0 feat: add fail-fast false setting 2024-09-18 16:06:42 +07:00
Slava-Shchipunov
a175f02ec7 fix: fix checkout to commit 2024-09-18 12:51:53 +07:00
Slava-Shchipunov
ba9ccdbb1c fix: fix checkout to commit 2024-09-18 12:43:49 +07:00
Slava-Shchipunov
cee202e856 refactor: change jobs names 2024-09-18 12:27:29 +07:00
Slava-Shchipunov
6a06445830 fix: fix ref 2024-09-18 12:24:04 +07:00
Slava-Shchipunov
6380c85064 feat: add action to build SNAPSHOT packages 2024-09-18 12:16:14 +07:00
Slava-Shchipunov
db1906c32a feat: get jobConfig to SNAPSHOTS 2024-09-18 12:14:34 +07:00
Slava-Shchipunov
27196b2ada docs: update README 2024-09-18 10:32:35 +07:00
Slava-Shchipunov
4bc84d4c9e Merge pull request #4 from Slava-Shchipunov/feat/build-for-all-devices
Feat/build for all devices
2024-09-18 10:25:19 +07:00
Svyatoslav Shchipunov
9adc89c272 fix: fix use cache 2024-08-14 12:14:09 +07:00
Slava-Shchipunov
847bcfbe77 fix: clear workspace before build 2024-08-14 11:19:56 +07:00
Slava-Shchipunov
96f91d8a61 refactor: change repo url 2024-08-14 10:53:06 +07:00
Slava-Shchipunov
8625a24b2e fix: clear workspace before build 2024-08-14 09:56:00 +07:00
Slava-Shchipunov
4505effac5 feat: upgrade workflow 2024-08-13 22:24:06 +07:00
Slava-Shchipunov
226ae606a8 feat: add openWRT data fetch 2024-08-13 21:27:15 +07:00
11 changed files with 1217 additions and 59 deletions

View File

@@ -1,22 +1,56 @@
name: Create Release on Tag
# on: [workflow_dispatch]
on:
push:
tags:
- "v*.*.*"
workflow_call:
inputs:
tag_name:
required: true
type: string
jobs:
generate-config:
runs-on: ubuntu-latest
outputs:
job-config: ${{ steps.generate-config.outputs.job-config }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.16.0'
- name: Get OpenWRT version from tag
id: get_version
run: |
if [ "${{ github.event_name }}" == "workflow_call" ]; then
echo "VERSION=${{ inputs.tag_name }}" >> $GITHUB_ENV
echo "VERSION=${VERSION#v}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
fi
- name: Install dependencies
run: npm install
- name: Generate Job Config
id: generate-config
run: node index.js ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
name: "v${{ matrix.build_env.tag }} - ${{ matrix.build_env.pkgarch}} :: ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} build"
runs-on: ubuntu-latest
needs: generate-config
strategy:
matrix:
build_env:
- tag: "22.03.4"
pkgarch: mipsel_24kc
target: ramips
subtarget: mt7621
vermagic: "2d6f3ce75b5e7700b705cb00cd526063"
build_env: ${{ fromJson(needs.generate-config.outputs.job-config) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
@@ -33,8 +67,6 @@ jobs:
with:
path: "**"
key: ${{ runner.os }}-build-vm4-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-vm4-cache-tools-kernel-${{ matrix.build_env.tag }}-${{ matrix.build_env.pkgarch}}-
- name: Building kernel and tools
#if: ${{ steps.cache-tools-kernel.outputs.cache-hit != 'true' }}
@@ -43,7 +75,7 @@ jobs:
# Setup & install feeds
wget https://downloads.openwrt.org/releases/${{ matrix.build_env.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf
echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf
echo "src-git awgopenwrt https://github.com/Slava-Shchipunov/awg-openwrt.git" >> ./feeds.conf
./scripts/feeds update && ./scripts/feeds install -a
# Setup config with AWG and dependencies
@@ -105,7 +137,7 @@ jobs:
run: |
tag_name=${{ github.ref_name }}
mkdir -p awgrelease
postfix="${tag_name}_v${{ matrix.build_env.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
postfix="v${{ matrix.build_env.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk
cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk
@@ -114,4 +146,3 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: awgrelease/*.ipk

View File

@@ -0,0 +1,187 @@
name: Build AmneziaWG for snapshot OpenWRT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
tags:
- "SNAPSHOT"
# schedule:
# - cron: '0 */4 * * *'
workflow_dispatch:
jobs:
generate-config:
runs-on: ubuntu-latest
outputs:
job-config: ${{ steps.generate-config.outputs.job-config }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.16.0'
- name: Install dependencies
run: npm install
- name: Generate Job Config
id: generate-config
run: node index.js SNAPSHOT
build:
name: "${{ matrix.build_env.tag }} - ${{ matrix.build_env.pkgarch}} :: ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} build"
runs-on: ubuntu-latest
needs: generate-config
strategy:
matrix:
build_env: ${{ fromJson(needs.generate-config.outputs.job-config) }}
fail-fast: false
steps:
- name: Check if release file exists
id: check_release
run: |
postfix="${{ matrix.build_env.tag }}_${{ matrix.build_env.vermagic }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
RELEASE_FILE="kmod-amneziawg_${postfix}.ipk"
TAG=${{ matrix.build_env.tag }}
echo "Checking for release file: $RELEASE_FILE in release: $TAG"
# Используем GitHub CLI для проверки наличия файла в релизе
if gh release view "$TAG" --repo Slava-Shchipunov/awg-openwrt --json assets --jq ".assets | .[].name" | grep -q "$RELEASE_FILE"; then
echo "Release file $RELEASE_FILE already exists. Skipping job."
echo "FILE_EXISTS=true" >> $GITHUB_ENV
else
echo "FILE_EXISTS=false" >> $GITHUB_ENV
fi
# Прерываем job'у, если файл уже существует
- name: Skip job if release file exists
if: env.FILE_EXISTS == 'true'
run: |
echo "Skipping job as release file already exists."
exit 0
- name: Get snapshot commit SHA and device ARCH
if: env.FILE_EXISTS == 'false'
run: |
PROFILE_URL="https://downloads.openwrt.org/snapshots/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/profiles.json"
SNAPSHOT_COMMIT_SHA=$(wget -q $PROFILE_URL -O- | tr ',' '\n' | grep "version_code"| awk -F: '{print $2}' | tr -d '"' | awk -F- '{print $2}')
echo "Snapshot commit sha: $SNAPSHOT_COMMIT_SHA"
echo "SNAPSHOT_COMMIT_SHA=$SNAPSHOT_COMMIT_SHA" >> $GITHUB_ENV
DEVICE_ARCH=$(wget -q $PROFILE_URL -O- | tr ',' '\n' | grep "arch_packages"| awk -F: '{print $2}' | tr -d '"')
echo "Device ARCH: $DEVICE_ARCH"
echo "DEVICE_ARCH=$DEVICE_ARCH" >> $GITHUB_ENV
- uses: actions/checkout@v4
if: env.FILE_EXISTS == 'false'
with:
repository: openwrt/openwrt
fetch-depth: 0
- name: Checkout snapshot commit in openwrt repo
if: env.FILE_EXISTS == 'false'
run: git checkout ${{ env.SNAPSHOT_COMMIT_SHA}}
- name: Building kernel and tools
if: env.FILE_EXISTS == 'false'
run: |
echo "pkgarch: ${{ matrix.build_env.pkgarch}}, target:${{ matrix.build_env.target}}, subtarget: ${{ matrix.build_env.subtarget}}"
# Setup & install feeds
wget https://downloads.openwrt.org/snapshots/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf
echo "src-git awgopenwrt https://github.com/Slava-Shchipunov/awg-openwrt.git" >> ./feeds.conf
./scripts/feeds update && ./scripts/feeds install -a
# Setup config with AWG and dependencies
wget https://downloads.openwrt.org/snapshots/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/config.buildinfo -O .config
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config
echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config
echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20=m" >> .config
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=m" >> .config
echo "CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=m" >> .config
make defconfig
echo " > make tools/install"
make tools/install -i -j `nproc`
cat ./build_dir/target-*/linux-*/linux-*/.vermagic || true
echo " > make toolchain/install"
make toolchain/install -i -j `nproc`
cat ./build_dir/target-*/linux-*/linux-*/.vermagic || true
# compile kernel module
echo " > make target/linux/compile"
make target/linux/compile -i -j `nproc` V=s
VERMAGIC=`cat ./build_dir/target-*/linux-*/linux-*/.vermagic`
VERMAGIC_EXPECTED=${{ matrix.build_env.vermagic }}
if [ "$VERMAGIC" != "$VERMAGIC_EXPECTED" ]; then
echo Vermagic mismatch: $VERMAGIC, expected $VERMAGIC_EXPECTED
exit 1
fi
- name: Build AmneziaWG
if: env.FILE_EXISTS == 'false'
run: |
VERMAGIC=`cat ./build_dir/target-*/linux-*/linux-*/.vermagic`
echo "Vermagic: $VERMAGIC"
VERMAGIC_EXPECTED=${{ matrix.build_env.vermagic }}
if [ "$VERMAGIC" != "$VERMAGIC_EXPECTED" ]; then
echo Vermagic mismatch: $VERMAGIC, expected $VERMAGIC_EXPECTED
exit 1
fi
# Ignore kmod build for some targets, replace with the awg-go
make package/kmod-amneziawg/{clean,download,prepare} V=s || true
make package/kmod-amneziawg/compile V=s || true
make package/luci-app-amneziawg/{clean,download,prepare}
make package/luci-app-amneziawg/compile V=s
make V=s package/amneziawg-tools/{clean,download,prepare}
make V=s package/amneziawg-tools/compile
- name: Prepare artifacts
if: env.FILE_EXISTS == 'false'
run: |
tag_name=${{ github.ref_name }}
mkdir -p awgrelease
postfix="${{ matrix.build_env.tag }}_${{ matrix.build_env.vermagic }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk
cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk
- name: Delete old release assets
if: env.FILE_EXISTS == 'false'
run: |
postfix="${{ matrix.build_env.pkgarch }}_${{ matrix.build_env.target }}_${{ matrix.build_env.subtarget }}"
echo "Looking for old release files ending with: ${postfix}"
# Получаем список всех артефактов релиза по имени
assets=$(gh release view "${{ matrix.build_env.tag }}" --repo Slava-Shchipunov/awg-openwrt --json assets --jq ".assets | .[] | select(.name | endswith(\"$postfix.ipk\")) | .name")
# Удаляем найденные артефакты по имени
for asset_name in $assets; do
echo "Deleting asset with name: $asset_name"
gh release delete-asset "${{ matrix.build_env.tag }}" "$asset_name" --repo Slava-Shchipunov/awg-openwrt
done
- name: Release
if: env.FILE_EXISTS == 'false'
uses: softprops/action-gh-release@v1
with:
files: awgrelease/*.ipk
tag_name: ${{ matrix.build_env.tag }}

66
.github/workflows/run-release.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Sync OpenWRT Releases
on:
# schedule:
# - cron: '0 0 */3 * *' # Проверка новых релизов раз в три дня
workflow_dispatch: # Возможность вручную запустить Action
jobs:
sync-releases:
runs-on: ubuntu-latest
outputs:
release_exists: ${{ steps.check_release.outputs.release_exists }}
release_tag: ${{ steps.get_release.outputs.release_tag }}
steps:
- name: Checkout your repo
uses: actions/checkout@v4
- name: Get the latest release from OpenWRT
id: get_release
run: |
curl -s https://api.github.com/repos/openwrt/openwrt/releases/latest > latest_release.json
RELEASE_TAG=$(jq -r .tag_name latest_release.json)
RELEASE_NAME=$(jq -r .name latest_release.json)
echo "::set-output name=release_tag::$RELEASE_TAG"
echo "::set-output name=release_name::$RELEASE_NAME"
- name: Check if release exists in your repo
id: check_release
run: |
RELEASE_EXISTS=$(curl -s https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases/tags/${{ steps.get_release.outputs.release_tag }} | jq -r .tag_name)
if [ "$RELEASE_EXISTS" == "null" ]; then
echo "::set-output name=release_exists::false"
else
echo "::set-output name=release_exists::true"
fi
- name: Create release in your repo
if: steps.check_release.outputs.release_exists == 'false'
run: |
ART="
\`\`\`
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| A M N E Z I A W I R E G U A R D
-----------------------------------------------------
OpenWrt ${{ steps.get_release.outputs.release_tag }}
-----------------------------------------------------
\`\`\`"
curl -X POST https://api.github.com/repos/Slava-Shchipunov/awg-openwrt/releases \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg tag "${{ steps.get_release.outputs.release_tag }}" \
--arg name "Build amnezia wg for all devices with openwrt ${{ steps.get_release.outputs.release_tag }}" \
--arg body "$ART" \
'{ tag_name: $tag, name: $name, body: $body }')"
run-build:
runs-on: ubuntu-latest
needs: sync-releases
if: needs.sync-releases.outputs.release_exists == 'false'
uses: Slava-Shchipunov/awg-openwrt/.github/workflows/build-module.yml@master
with:
tag_name: ${{ needs.sync-releases.outputs.release_tag }}

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.idea/
node_modules/

View File

@@ -1,17 +1,30 @@
# Автоматическая настройка AmneziaWG для OpenWRT версии 23.05.0 и более новых
Для автоматической настройки рекомендую использовать [скрипт](https://github.com/itdoginfo/domain-routing-openwrt) от пользователя itdog. Этот скрипт позволяет автоматически скачать нужные пакеты из собранных здесь и настроить [точечный обход блокировок по доменам](https://habr.com/ru/articles/767464/).
Если же вам нужно только установить пакеты, я добавил скрипт amneziawg-install - он автоматически скачает пакеты из этого репозитория под ваше устройство (только для стабильной версии OpenWRT), а также предложит сразу настроить интерфейс с протоколом AmneziaWG. Если пользователь согласится, нужно будет ввести параметры конфига, которые запросит скрипт. При этом скрипт создаст интерфейс, настроит для него правила фаерволла, а также **включит перенаправление всего траффика через тунель AmneziaWG** (установит в настройках Peer галочку Route Allowed IPs).
Для запуска скрипта подключитесь к роутеру по SSH, введите команду и следуйте инструкциям на экране:
```
sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)
```
# Сборка пакетов для всех устройств, поддерживающих OpenWRT
В репозиторий в ветку `feat/build-for-all-devices` добавлен скрипт, который парсит данные о поддерживаемых платформах со страницы OpenWRT и автоматически запускает сборку пакетов AmneziaWG для всех устройств.
В репозиторий добавлен скрипт, который парсит данные о поддерживаемых платформах со страницы OpenWRT и автоматически запускает сборку пакетов AmneziaWG для всех устройств.
На данный момент я собрал пакеты для всех устройств для OpenWRT версий:
1) [23.05.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.0)
2) [23.05.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.1)
3) [23.05.2](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.2)
4) [23.05.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.3)
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)
Также запускал сборку для версии [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), но там для двух платформ сборка завершилась ошибкой. Так как это достаточно старая версия OpenWRT,
я не стал разбираться, в чем проблема.
И собрал пакеты для популярных устройств для OpenWRT [SNAPSHOT](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/SNAPSHOT)
Также запускал сборку для версии [22.03.7](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v22.03.7), но там для двух платформ сборка завершилась ошибкой. Так как это достаточно старая версия OpenWRT, я не стал разбираться, в чем проблема.
В дальнейшем при выходе новых релизов OpenWRT будут автоматически создаваться релизы с пакетами AmneziaWG и запускаться сборка пакетов под все устройства, поддерживаемые новой версией. Github action для проверки появления нового релиза запускается автоматически раз в 3 дня, а также может быть запущен вручную.
## Автоматическая сборка пакетов для SNAPSHOT версии
В репозитории настроен github action, который запускается каждые 4 часа и проверяет [страницу снапшотов](https://downloads.openwrt.org/snapshots/targets/) сайта OpenWRT. При этом, если для какой-то платформы обнаруживается снапшот с более новой версией ядра, запускается сборка пакетов под эту платформу, а новые файлы заменяют старые. В целях экономии ресурсов и ускорения процесса сборки, пакеты собираются только для популярных платформ, которые указаны в массиве `SNAPSHOT_SUBTARGETS_TO_BUILD` в файле index.js.
## Выбор пакетов для своего устройства
В соответствии с пунктом [Указываем переменные для сборки](https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build#%D1%83%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B4%D0%BB%D1%8F-%D1%81%D0%B1%D0%BE%D1%80%D0%BA%D0%B8)
@@ -22,7 +35,7 @@
2) Переключиться на вкладку Actions и включить Github actions (по умолчанию для форков они выключены)
3) Затем перейти на вкладку Code => Releases (в правой части экрана) => Draft a new release
4) Нажать Choose a tag и создать новый тег формата vX.X.X, где вместо X.X.X нужно подставить требуемую версию OpenWRT, например, v23.05.4
5) Выбрать в качестве target ветку `feat/build-for-all-devices`
5) Выбрать в качестве target ветку `master`
6) Ввести Release title
7) Нажать внизу зеленую кнопку Publish release
@@ -35,8 +48,14 @@
# Automatic configuration of AmneziaWG for OpenWRT version 23.05.0 and newer
For automatic configuration, I recommend using the [script](https://github.com/itdoginfo/domain-routing-openwrt) from the user itdog. 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).
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:
```
sh <(wget -O - https://raw.githubusercontent.com/Slava-Shchipunov/awg-openwrt/refs/heads/master/amneziawg-install.sh)
```
# Building packages for all devices that support OpenWRT
A script has been added to the repository in the `feat/build-for-all-devices` branch that parses data on supported platforms from the OpenWRT page and automatically starts building AmneziaWG packages for all devices.
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.
At the moment I have collected packages for all devices for OpenWRT versions:
1) [23.05.0](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.0)
2) [23.05.1](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.1)
@@ -44,8 +63,14 @@ At the moment I have collected packages for all devices for OpenWRT versions:
4) [23.05.3](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.3)
5) [23.05.4](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v23.05.4)
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.
And collected packages for popular devices for OpenWRT [SNAPSHOT](https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/SNAPSHOT)
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.
In the future, when new OpenWRT releases are released, releases with AmneziaWG packages will be automatically created and the package build will be launched for all devices supported by the new version. Github action for checking for a new release is launched automatically every 3 days, and can also be launched manually.
## Automatic package build for SNAPSHOT version
A github action is configured in the repository, which runs every 4 hours and checks the [snapshots page](https://downloads.openwrt.org/snapshots/targets/) of the OpenWRT website. At the same time, if a snapshot with a newer kernel version is found for some platform, the package build for this platform is launched, and the new files replace the old ones. In order to save resources and speed up the build process, packages are built only for popular platforms, which are specified in the `SNAPSHOT_SUBTARGETS_TO_BUILD` array in the index.js file.
## Selecting packages for your device
In accordance with the paragraph [Specify variables for builds](https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build#%D1%83%D0%BA%D0%B0%D0%B7%D1%8B%D0%B2%D0%B0%D0%B5%D0%BC-%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B4%D0%BB%D1%8F-%D1%81%D0%B1%D0%BE%D1%80%D0%BA%D0%B8) (instructions in Russian) determine `target` and `subtarget` of your device. Then go to the release page corresponding to your OpenWRT version, then search the page (Ctrl+F) to find 3 packages whose names end in `target_subtarget.ipk` corresponding to your device.
@@ -55,7 +80,7 @@ In accordance with the paragraph [Specify variables for builds](https://github.c
2) Switch to the Actions tab and enable Github actions (they are disabled for forks by default)
3) Then go to the Code tab => Releases (on the right side of the screen) => Draft a new release
4) Click Choose a tag and create a new tag in the vX.X.X format, where you need to substitute the required OpenWRT version for X.X.X, for example, v23.05.4
5) Select the `feat/build-for-all-devices` branch as the target
5) Select the `master` branch as the target
6) Enter Release title
7) Click the green Publish release button at the bottom

207
amneziawg-install.sh Normal file
View File

@@ -0,0 +1,207 @@
#!/bin/sh
#set -x
#Репозиторий OpenWRT должен быть доступен для установки зависимостей пакета kmod-amneziawg
check_repo() {
printf "\033[32;1mChecking OpenWrt repo availability...\033[0m\n"
opkg update | grep -q "Failed to download" && printf "\033[32;1mopkg failed. Check internet or date. Command for force ntp sync: ntpd -p ptbtime1.ptb.de\033[0m\n" && exit 1
}
install_awg_packages() {
# Получение pkgarch с наибольшим приоритетом
PKGARCH=$(opkg print-architecture | awk 'BEGIN {max=0} {if ($3 > max) {max = $3; arch = $2}} END {print arch}')
TARGET=$(ubus call system board | jsonfilter -e '@.release.target' | cut -d '/' -f 1)
SUBTARGET=$(ubus call system board | jsonfilter -e '@.release.target' | cut -d '/' -f 2)
VERSION=$(ubus call system board | jsonfilter -e '@.release.version')
PKGPOSTFIX="_v${VERSION}_${PKGARCH}_${TARGET}_${SUBTARGET}.ipk"
BASE_URL="https://github.com/Slava-Shchipunov/awg-openwrt/releases/download/"
AWG_DIR="/tmp/amneziawg"
mkdir -p "$AWG_DIR"
if opkg list-installed | grep -q kmod-amneziawg; then
echo "kmod-amneziawg already installed"
else
KMOD_AMNEZIAWG_FILENAME="kmod-amneziawg${PKGPOSTFIX}"
DOWNLOAD_URL="${BASE_URL}v${VERSION}/${KMOD_AMNEZIAWG_FILENAME}"
wget -O "$AWG_DIR/$KMOD_AMNEZIAWG_FILENAME" "$DOWNLOAD_URL"
if [ $? -eq 0 ]; then
echo "kmod-amneziawg file downloaded successfully"
else
echo "Error downloading kmod-amneziawg. Please, install kmod-amneziawg manually and run the script again"
exit 1
fi
opkg install "$AWG_DIR/$KMOD_AMNEZIAWG_FILENAME"
if [ $? -eq 0 ]; then
echo "kmod-amneziawg file downloaded successfully"
else
echo "Error installing kmod-amneziawg. Please, install kmod-amneziawg manually and run the script again"
exit 1
fi
fi
if opkg list-installed | grep -q amneziawg-tools; then
echo "amneziawg-tools already installed"
else
AMNEZIAWG_TOOLS_FILENAME="amneziawg-tools${PKGPOSTFIX}"
DOWNLOAD_URL="${BASE_URL}v${VERSION}/${AMNEZIAWG_TOOLS_FILENAME}"
wget -O "$AWG_DIR/$AMNEZIAWG_TOOLS_FILENAME" "$DOWNLOAD_URL"
if [ $? -eq 0 ]; then
echo "amneziawg-tools file downloaded successfully"
else
echo "Error downloading amneziawg-tools. Please, install amneziawg-tools manually and run the script again"
exit 1
fi
opkg install "$AWG_DIR/$AMNEZIAWG_TOOLS_FILENAME"
if [ $? -eq 0 ]; then
echo "amneziawg-tools file downloaded successfully"
else
echo "Error installing amneziawg-tools. Please, install amneziawg-tools manually and run the script again"
exit 1
fi
fi
if opkg list-installed | grep -q luci-app-amneziawg; then
echo "luci-app-amneziawg already installed"
else
LUCI_APP_AMNEZIAWG_FILENAME="luci-app-amneziawg${PKGPOSTFIX}"
DOWNLOAD_URL="${BASE_URL}v${VERSION}/${LUCI_APP_AMNEZIAWG_FILENAME}"
wget -O "$AWG_DIR/$LUCI_APP_AMNEZIAWG_FILENAME" "$DOWNLOAD_URL"
if [ $? -eq 0 ]; then
echo "luci-app-amneziawg file downloaded successfully"
else
echo "Error downloading luci-app-amneziawg. Please, install luci-app-amneziawg manually and run the script again"
exit 1
fi
opkg install "$AWG_DIR/$LUCI_APP_AMNEZIAWG_FILENAME"
if [ $? -eq 0 ]; then
echo "luci-app-amneziawg file downloaded successfully"
else
echo "Error installing luci-app-amneziawg. Please, install luci-app-amneziawg manually and run the script again"
exit 1
fi
fi
rm -rf "$AWG_DIR"
}
configure_amneziawg_interface() {
INTERFACE_NAME="awg1"
CONFIG_NAME="amneziawg_awg1"
PROTO="amneziawg"
ZONE_NAME="awg1"
read -r -p "Enter the private key (from [Interface]):"$'\n' AWG_PRIVATE_KEY_INT
while true; do
read -r -p "Enter internal IP address with subnet, example 192.168.100.5/24 (from [Interface]):"$'\n' AWG_IP
if echo "$AWG_IP" | egrep -oq '^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]+$'; then
break
else
echo "This IP is not valid. Please repeat"
fi
done
read -r -p "Enter the public key (from [Peer]):"$'\n' AWG_PUBLIC_KEY_INT
read -r -p "If use PresharedKey, Enter this (from [Peer]). If your don't use leave blank:"$'\n' AWG_PRESHARED_KEY_INT
read -r -p "Enter Endpoint host without port (Domain or IP) (from [Peer]):"$'\n' AWG_ENDPOINT_INT
read -r -p "Enter Endpoint host port (from [Peer]) [51820]:"$'\n' AWG_ENDPOINT_PORT_INT
AWG_ENDPOINT_PORT_INT=${AWG_ENDPOINT_PORT_INT:-51820}
if [ "$AWG_ENDPOINT_PORT_INT" = '51820' ]; then
echo $AWG_ENDPOINT_PORT_INT
fi
read -r -p "Enter Jc value (from [Interface]):"$'\n' AWG_JC
read -r -p "Enter Jmin value (from [Interface]):"$'\n' AWG_JMIN
read -r -p "Enter Jmax value (from [Interface]):"$'\n' AWG_JMAX
read -r -p "Enter S1 value (from [Interface]):"$'\n' AWG_S1
read -r -p "Enter S2 value (from [Interface]):"$'\n' AWG_S2
read -r -p "Enter H1 value (from [Interface]):"$'\n' AWG_H1
read -r -p "Enter H2 value (from [Interface]):"$'\n' AWG_H2
read -r -p "Enter H3 value (from [Interface]):"$'\n' AWG_H3
read -r -p "Enter H4 value (from [Interface]):"$'\n' AWG_H4
uci set network.${INTERFACE_NAME}=interface
uci set network.${INTERFACE_NAME}.proto=$PROTO
uci set network.${INTERFACE_NAME}.private_key=$AWG_PRIVATE_KEY_INT
uci set network.${INTERFACE_NAME}.listen_port='51821'
uci set network.${INTERFACE_NAME}.addresses=$AWG_IP
uci set network.${INTERFACE_NAME}.awg_jc=$AWG_JC
uci set network.${INTERFACE_NAME}.awg_jmin=$AWG_JMIN
uci set network.${INTERFACE_NAME}.awg_jmax=$AWG_JMAX
uci set network.${INTERFACE_NAME}.awg_s1=$AWG_S1
uci set network.${INTERFACE_NAME}.awg_s2=$AWG_S2
uci set network.${INTERFACE_NAME}.awg_h1=$AWG_H1
uci set network.${INTERFACE_NAME}.awg_h2=$AWG_H2
uci set network.${INTERFACE_NAME}.awg_h3=$AWG_H3
uci set network.${INTERFACE_NAME}.awg_h4=$AWG_H4
if ! uci show network | grep -q ${CONFIG_NAME}; then
uci add network ${CONFIG_NAME}
fi
uci set network.@${CONFIG_NAME}[0]=$CONFIG_NAME
uci set network.@${CONFIG_NAME}[0].name="${INTERFACE_NAME}_client"
uci set network.@${CONFIG_NAME}[0].public_key=$AWG_PUBLIC_KEY_INT
uci set network.@${CONFIG_NAME}[0].preshared_key=$AWG_PRESHARED_KEY_INT
uci set network.@${CONFIG_NAME}[0].route_allowed_ips='1'
uci set network.@${CONFIG_NAME}[0].persistent_keepalive='25'
uci set network.@${CONFIG_NAME}[0].endpoint_host=$AWG_ENDPOINT_INT
uci set network.@${CONFIG_NAME}[0].allowed_ips='0.0.0.0/0'
uci add_list network.@${CONFIG_NAME}[0].allowed_ips='::/0'
uci set network.@${CONFIG_NAME}[0].endpoint_port=$AWG_ENDPOINT_PORT_INT
uci commit network
if ! uci show firewall | grep -q "@zone.*name='${ZONE_NAME}'"; then
printf "\033[32;1mZone Create\033[0m\n"
uci add firewall zone
uci set firewall.@zone[-1].name=$ZONE_NAME
uci set firewall.@zone[-1].network=$INTERFACE_NAME
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].mtu_fix='1'
uci set firewall.@zone[-1].family='ipv4'
uci commit firewall
fi
if ! uci show firewall | grep -q "@forwarding.*name='${ZONE_NAME}'"; then
printf "\033[32;1mConfigured forwarding\033[0m\n"
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].name="${ZONE_NAME}-lan"
uci set firewall.@forwarding[-1].dest=${ZONE_NAME}
uci set firewall.@forwarding[-1].src='lan'
uci set firewall.@forwarding[-1].family='ipv4'
uci commit firewall
fi
}
check_repo
install_awg_packages
printf "\033[32;1mDo you want to configure the amneziawg interface? (y/n): \033[0m\n"
read IS_SHOULD_CONFIGURE_AWG_INTERFACE
if [ "$IS_SHOULD_CONFIGURE_AWG_INTERFACE" = "y" ] || [ "$IS_SHOULD_CONFIGURE_AWG_INTERFACE" = "Y" ]; then
configure_amneziawg_interface
else
printf "\033[32;1mSkipping amneziawg interface configuration.\033[0m\n"
fi
service network restart

99
index.js Normal file
View File

@@ -0,0 +1,99 @@
const axios = require('axios');
const cheerio = require('cheerio');
const core = require('@actions/core');
const version = process.argv[2]; // Получение версии OpenWRT из аргумента командной строки
const SNAPSHOT_TARGETS_TO_BUILD = ['mediatek', 'ramips', 'x86', 'armsr'];
const SNAPSHOT_SUBTARGETS_TO_BUILD = ['filogic', 'mt7622', 'mt7623', 'mt7629', 'mt7620', 'mt7621', 'mt76x8', '64', 'generic', 'armv8'];
if (!version) {
core.setFailed('Version argument is required');
process.exit(1);
}
const url = version === 'SNAPSHOT' ? 'https://downloads.openwrt.org/snapshots/targets/' : `https://downloads.openwrt.org/releases/${version}/targets/`;
async function fetchHTML(url) {
try {
const { data } = await axios.get(url);
return cheerio.load(data);
} catch (error) {
console.error(`Error fetching HTML for ${url}: ${error}`);
throw error;
}
}
async function getTargets() {
const $ = await fetchHTML(url);
const targets = [];
$('table tr td.n a').each((index, element) => {
const name = $(element).attr('href');
if (name && name.endsWith('/')) {
targets.push(name.slice(0, -1));
}
});
return targets;
}
async function getSubtargets(target) {
const $ = await fetchHTML(`${url}${target}/`);
const subtargets = [];
$('table tr td.n a').each((index, element) => {
const name = $(element).attr('href');
if (name && name.endsWith('/')) {
subtargets.push(name.slice(0, -1));
}
});
return subtargets;
}
async function getDetails(target, subtarget) {
const packagesUrl = `${url}${target}/${subtarget}/packages/`;
const $ = await fetchHTML(packagesUrl);
let vermagic = '';
let pkgarch = '';
$('a').each((index, element) => {
const name = $(element).attr('href');
if (name && name.startsWith('kernel_')) {
const vermagicMatch = name.match(/kernel_\d+\.\d+\.\d+(?:-\d+)?[-~]([a-f0-9]+)(?:-r\d+)?_([a-zA-Z0-9_-]+)\.ipk$/);
if (vermagicMatch) {
vermagic = vermagicMatch[1];
pkgarch = vermagicMatch[2];
}
}
});
return { vermagic, pkgarch };
}
async function main() {
try {
const targets = await getTargets();
const jobConfig = [];
for (const target of targets) {
const subtargets = await getSubtargets(target);
for (const subtarget of subtargets) {
const { vermagic, pkgarch } = await getDetails(target, subtarget);
if (version !== 'SNAPSHOT' || (SNAPSHOT_SUBTARGETS_TO_BUILD.includes(subtarget) && SNAPSHOT_TARGETS_TO_BUILD.includes(target))) {
jobConfig.push({
tag: version,
target,
subtarget,
vermagic,
pkgarch,
});
}
}
}
core.setOutput('job-config', JSON.stringify(jobConfig));
} catch (error) {
core.setFailed(error.message);
}
}
main();

View File

@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=Support for AmneziaWG VPN
LUCI_DEPENDS:=+amneziawg-tools +ucode
LUCI_DEPENDS:=+amneziawg-tools +ucode +qrencode
LUCI_PKGARCH:=all
PKG_PROVIDES:=luci-app-amneziawg

View File

@@ -64,15 +64,29 @@ function generateDescription(name, texts) {
]);
}
function invokeQREncode(data, code) {
function invokeQREncode(data, div) {
var code = div.children[0];
var btn = div.children[1];
dom.content(btn, [
E('a', {
'class': 'btn cbi-button-action',
'style': 'text-align: center',
'href': 'data:text/plain;charset=utf-8,' + encodeURIComponent(data),
'download': 'amneziawg.conf'
}, ['Download Configuration']),
]);
return fs.exec_direct('/usr/bin/qrencode', [
'--inline', '--8bit', '--type=SVG',
'--output=-', '--', data
]).then(function(svg) {
code.style.opacity = '';
div.style.opacity = '';
dom.content(code, Object.assign(E(svg), { style: 'width:100%;height:auto' }));
}).catch(function(error) {
code.style.opacity = '';
div.style.opacity = '';
if (L.isObject(error) && error.name == 'NotFoundError') {
dom.content(code, [
@@ -402,15 +416,15 @@ return network.registerProtocol('amneziawg', {
s.getOption('public_key').getUIElement(s.section).setValue(keypair.pub);
s.getOption('listen_port').getUIElement(s.section).setValue(config.interface_listenport || '');
s.getOption('addresses').getUIElement(s.section).setValue(config.interface_address);
s.getOption('awg_jc').getUIElement(s.section).setValue(config.awg_jc);
s.getOption('awg_jmin').getUIElement(s.section).setValue(config.awg_jmin);
s.getOption('awg_jmax').getUIElement(s.section).setValue(config.awg_jmax);
s.getOption('awg_s1').getUIElement(s.section).setValue(config.awg_s1);
s.getOption('awg_s2').getUIElement(s.section).setValue(config.awg_s2);
s.getOption('awg_h1').getUIElement(s.section).setValue(config.awg_h1);
s.getOption('awg_h2').getUIElement(s.section).setValue(config.awg_h2);
s.getOption('awg_h3').getUIElement(s.section).setValue(config.awg_h3);
s.getOption('awg_h4').getUIElement(s.section).setValue(config.awg_h4);
s.getOption('awg_jc').getUIElement(s.section).setValue(config.interface_jc);
s.getOption('awg_jmin').getUIElement(s.section).setValue(config.interface_jmin);
s.getOption('awg_jmax').getUIElement(s.section).setValue(config.interface_jmax);
s.getOption('awg_s1').getUIElement(s.section).setValue(config.interface_s1);
s.getOption('awg_s2').getUIElement(s.section).setValue(config.interface_s2);
s.getOption('awg_h1').getUIElement(s.section).setValue(config.interface_h1);
s.getOption('awg_h2').getUIElement(s.section).setValue(config.interface_h2);
s.getOption('awg_h3').getUIElement(s.section).setValue(config.interface_h3);
s.getOption('awg_h4').getUIElement(s.section).setValue(config.interface_h4);
if (config.interface_dns)
s.getOption('dns').getUIElement(s.section).setValue(config.interface_dns);
@@ -743,39 +757,65 @@ return network.registerProtocol('amneziawg', {
o.modalonly = true;
o.createPeerConfig = function(section_id, endpoint, ips) {
o.createPeerConfig = function (section_id, endpoint, ips, eips, dns) {
var pub = s.formvalue(s.section, 'public_key'),
port = s.formvalue(s.section, 'listen_port') || '51820',
jc = s.formvalue
prv = this.section.formvalue(section_id, 'private_key'),
psk = this.section.formvalue(section_id, 'preshared_key'),
eport = this.section.formvalue(section_id, 'endpoint_port'),
keep = this.section.formvalue(section_id, 'persistent_keepalive');
// If endpoint is IPv6 we must escape it with []
port = s.formvalue(s.section, 'listen_port') || '51820',
prv = this.section.formvalue(section_id, 'private_key'),
psk = this.section.formvalue(section_id, 'preshared_key'),
eport = this.section.formvalue(section_id, 'endpoint_port'),
keep = this.section.formvalue(section_id, 'persistent_keepalive'),
jc = s.formvalue(s.section, 'awg_jc'),
jmin = s.formvalue(s.section, 'awg_jmin'),
jmax = s.formvalue(s.section, 'awg_jmax'),
s1 = s.formvalue(s.section, 'awg_s1'),
s2 = s.formvalue(s.section, 'awg_s2'),
h1 = s.formvalue(s.section, 'awg_h1'),
h2 = s.formvalue(s.section, 'awg_h2'),
h3 = s.formvalue(s.section, 'awg_h3'),
h4 = s.formvalue(s.section, 'awg_h4');
if (endpoint.indexOf(':') > 0) {
endpoint = '['+endpoint+']';
endpoint = '[' + endpoint + ']';
}
return [
var configLines = [
'[Interface]',
'PrivateKey = ' + prv,
eport ? 'ListenPort = ' + eport : '# ListenPort not defined',
eips && eips.length ? 'Address = ' + eips.join(', ') : '# Address not defined',
dns && dns.length ? 'DNS = ' + dns.join(', ') : '# DNS not defined',
''
];
if (jc) configLines.push('jc = ' + jc);
if (jmin) configLines.push('jmin = ' + jmin);
if (jmax) configLines.push('jmax = ' + jmax);
if (s1) configLines.push('s1 = ' + s1);
if (s2) configLines.push('s2 = ' + s2);
if (h1) configLines.push('h1 = ' + h1);
if (h2) configLines.push('h2 = ' + h2);
if (h3) configLines.push('h3 = ' + h3);
if (h4) configLines.push('h4 = ' + h4);
configLines.push(
'',
'[Peer]',
'PublicKey = ' + pub,
psk ? 'PresharedKey = ' + psk : '# PresharedKey not used',
ips && ips.length ? 'AllowedIPs = ' + ips.join(', ') : '# AllowedIPs not defined',
endpoint ? 'Endpoint = ' + endpoint + ':' + port : '# Endpoint not defined',
keep ? 'PersistentKeepAlive = ' + keep : '# PersistentKeepAlive not defined'
].join('\n');
};
keep ? 'PersistentKeepAlive = ' + keep : '# PersistentKeepAlive not defined',
''
);
return configLines.join('\n');
};
o.handleGenerateQR = function(section_id, ev) {
var mapNode = ss.getActiveModalMap(),
headNode = mapNode.parentNode.querySelector('h4'),
configGenerator = this.createPeerConfig.bind(this, section_id),
parent = this.map;
headNode = mapNode.parentNode.querySelector('h4'),
configGenerator = this.createPeerConfig.bind(this, section_id),
parent = this.map,
eips = this.section.formvalue(section_id, 'allowed_ips');
return Promise.all([
network.getWANNetworks(),
@@ -804,21 +844,33 @@ return network.registerProtocol('amneziawg', {
var ips = [ '0.0.0.0/0', '::/0' ];
var dns = [];
var qrm, qrs, qro;
qrm = new form.JSONMap({ config: { endpoint: hostnames[0], allowed_ips: ips } }, null, _('The generated configuration can be imported into a AmneziaWG client application to set up a connection towards this device.'));
qrm = new form.JSONMap({
config: {
endpoint: hostnames[0],
allowed_ips: ips,
addresses: eips,
dns_servers: dns
}
}, null, _('The generated configuration can be imported into a AmneziaWG client application to set up a connection towards this device.'));
qrm.parent = parent;
qrs = qrm.section(form.NamedSection, 'config');
function handleConfigChange(ev, section_id, value) {
var code = this.map.findElement('.qr-code'),
conf = this.map.findElement('.client-config'),
endpoint = this.section.getUIElement(section_id, 'endpoint'),
ips = this.section.getUIElement(section_id, 'allowed_ips');
conf = this.map.findElement('.client-config'),
endpoint = this.section.getUIElement(section_id, 'endpoint'),
ips = this.section.getUIElement(section_id, 'allowed_ips');
eips = this.section.getUIElement(section_id, 'addresses');
dns = this.section.getUIElement(section_id, 'dns_servers');
if (this.isValid(section_id)) {
conf.firstChild.data = configGenerator(endpoint.getValue(), ips.getValue());
conf.firstChild.data = configGenerator(endpoint.getValue(), ips.getValue(), eips.getValue(), dns.getValue());
code.style.opacity = '.5';
invokeQREncode(conf.firstChild.data, code);
@@ -836,18 +888,36 @@ return network.registerProtocol('amneziawg', {
ips.forEach(function(ip) { qro.value(ip) });
qro.onchange = handleConfigChange;
qro = qrs.option(form.DynamicList, 'dns_servers', _('DNS Servers'), _('DNS servers for the remote clients using this tunnel to your openwrt device. Some wireguard clients require this to be set.'));
qro.datatype = 'ipaddr';
qro.default = dns;
qro.onchange = handleConfigChange;
qro = qrs.option(form.DynamicList, 'addresses', _('Addresses'), _('IP addresses for the peer to use inside the tunnel. Some clients require this setting.'));
qro.datatype = 'ipaddr';
qro.default = eips;
eips.forEach(function(eip) { qro.value(eip) });
qro.onchange = handleConfigChange;
qro = qrs.option(form.DummyValue, 'output');
qro.renderWidget = function() {
var peer_config = configGenerator(hostnames[0], ips);
var peer_config = configGenerator(hostnames[0], ips, eips, dns);
var node = E('div', {
'style': 'display:flex;flex-wrap:wrap;align-items:center;gap:.5em;width:100%'
}, [
E('div', {
'class': 'qr-code',
'style': 'width:320px;flex:0 1 320px;text-align:center'
'style': 'display:flex; flex-direction: column; text-align: center',
}, [
E('em', { 'class': 'spinning' }, [ _('Generating QR code…') ])
E('div', {
'style': 'width:320px;flex:0 1 320px;text-align:center'
}, [
E('em', { 'class': 'spinning' }, [ _('Generating QR code…') ])
]),
E('div', {
}, ['Download Configuration']),
]),
E('pre', {
'class': 'client-config',

448
package-lock.json generated Normal file
View File

@@ -0,0 +1,448 @@
{
"name": "awg-openwrt",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "awg-openwrt",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.1",
"axios": "^1.3.1",
"cheerio": "^1.0.0"
}
},
"node_modules/@actions/core": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
"license": "MIT",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/http-client": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz",
"integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==",
"license": "MIT",
"dependencies": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
}
},
"node_modules/@actions/http-client/node_modules/undici": {
"version": "5.28.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
"license": "MIT",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
}
},
"node_modules/@fastify/busboy": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
"license": "MIT",
"engines": {
"node": ">=14"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/axios": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz",
"integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
"license": "ISC"
},
"node_modules/cheerio": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz",
"integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==",
"license": "MIT",
"dependencies": {
"cheerio-select": "^2.1.0",
"dom-serializer": "^2.0.0",
"domhandler": "^5.0.3",
"domutils": "^3.1.0",
"encoding-sniffer": "^0.2.0",
"htmlparser2": "^9.1.0",
"parse5": "^7.1.2",
"parse5-htmlparser2-tree-adapter": "^7.0.0",
"parse5-parser-stream": "^7.1.2",
"undici": "^6.19.5",
"whatwg-mimetype": "^4.0.0"
},
"engines": {
"node": ">=18.17"
},
"funding": {
"url": "https://github.com/cheeriojs/cheerio?sponsor=1"
}
},
"node_modules/cheerio-select": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz",
"integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0",
"css-select": "^5.1.0",
"css-what": "^6.1.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.0.1"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/css-select": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
"integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0",
"css-what": "^6.1.0",
"domhandler": "^5.0.2",
"domutils": "^3.0.1",
"nth-check": "^2.0.1"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/css-what": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
"integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
"license": "BSD-2-Clause",
"engines": {
"node": ">= 6"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/dom-serializer": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
"license": "MIT",
"dependencies": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.2",
"entities": "^4.2.0"
},
"funding": {
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"node_modules/domelementtype": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
"integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "BSD-2-Clause"
},
"node_modules/domhandler": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
"license": "BSD-2-Clause",
"dependencies": {
"domelementtype": "^2.3.0"
},
"engines": {
"node": ">= 4"
},
"funding": {
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
"node_modules/domutils": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz",
"integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
"license": "BSD-2-Clause",
"dependencies": {
"dom-serializer": "^2.0.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3"
},
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/encoding-sniffer": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz",
"integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==",
"license": "MIT",
"dependencies": {
"iconv-lite": "^0.6.3",
"whatwg-encoding": "^3.1.1"
},
"funding": {
"url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/follow-redirects": {
"version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"license": "MIT",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/htmlparser2": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz",
"integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==",
"funding": [
"https://github.com/fb55/htmlparser2?sponsor=1",
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"license": "MIT",
"dependencies": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.1.0",
"entities": "^4.5.0"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/nth-check": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
"integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
"license": "BSD-2-Clause",
"dependencies": {
"boolbase": "^1.0.0"
},
"funding": {
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
"node_modules/parse5": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz",
"integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",
"license": "MIT",
"dependencies": {
"entities": "^4.4.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"node_modules/parse5-htmlparser2-tree-adapter": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz",
"integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==",
"license": "MIT",
"dependencies": {
"domhandler": "^5.0.2",
"parse5": "^7.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"node_modules/parse5-parser-stream": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
"integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==",
"license": "MIT",
"dependencies": {
"parse5": "^7.0.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT"
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT"
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"license": "MIT",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/undici": {
"version": "6.19.7",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.7.tgz",
"integrity": "sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==",
"license": "MIT",
"engines": {
"node": ">=18.17"
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"license": "MIT",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/whatwg-encoding": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
"integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
"license": "MIT",
"dependencies": {
"iconv-lite": "0.6.3"
},
"engines": {
"node": ">=18"
}
},
"node_modules/whatwg-mimetype": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
"integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
"license": "MIT",
"engines": {
"node": ">=18"
}
}
}
}

24
package.json Normal file
View File

@@ -0,0 +1,24 @@
{
"name": "awg-openwrt",
"version": "1.0.0",
"description": "Amnezia Wireguard packages for OpenWRT",
"main": "index.js",
"scripts": {
"get-build-envs": "node index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Slava-Shchipunov/awg-openwrt.git"
},
"author": "Slava Shchipunov",
"license": "ISC",
"bugs": {
"url": "https://github.com/Slava-Shchipunov/awg-openwrt/issues"
},
"homepage": "https://github.com/Slava-Shchipunov/awg-openwrt#readme",
"dependencies": {
"@actions/core": "^1.10.1",
"axios": "^1.3.1",
"cheerio": "^1.0.0"
}
}