From 73164b56dd1d56a57fd64f4a2f69a28367a13f77 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Sat, 30 Nov 2024 17:14:43 +0300 Subject: [PATCH 1/4] Add signing public key The key used primarily for OpenWRT apk --- youtubeUnblock.pem | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 youtubeUnblock.pem diff --git a/youtubeUnblock.pem b/youtubeUnblock.pem new file mode 100644 index 0000000..8aa16e2 --- /dev/null +++ b/youtubeUnblock.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoeHyI7xqf2Y5weRscJxUy/BRoKqT +2dE9xFsZ2HKBTd2UMMkOwca+/BDXRZlxWGvcVNhDyLY9VGnZniF2JaH+Fw== +-----END PUBLIC KEY----- From 962026f0b6065e1e6373b148ee96ec3cfaadd546 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Sat, 30 Nov 2024 17:22:44 +0300 Subject: [PATCH 2/4] Update workflow for openwrt 24.10 --- .github/workflows/build-ci.yml | 38 +++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index b06ccf5..6f1d548 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -38,6 +38,8 @@ jobs: echo "sha=$(gh api repos/$REPO/commits/main --jq '.sha[:7]')" >> $GITHUB_OUTPUT fi + cat $GITHUB_OUTPUT + build-static: needs: prepare name: build ${{ matrix.arch }} @@ -167,6 +169,13 @@ jobs: matrix: branch: - openwrt-23.05 + - SNAPSHOT + include: + - branch: SNAPSHOT + package_extension: apk + - branch: openwrt-23.05 + package_extension: ipk + arch: - aarch64_cortex-a53 - aarch64_cortex-a72 @@ -194,6 +203,9 @@ jobs: - mipsel_74kc - mipsel_mips32 - x86_64 + exclude: + - branch: SNAPSHOT + arch: arm_mpcore container: image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }} options: --user root @@ -209,7 +221,8 @@ jobs: RELEASE: ${{ needs.prepare.outputs.release }} SHA: ${{ needs.prepare.outputs.sha }} run: | - sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile + sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblock/Makefile + - name: Initilalize SDK id: init_sdk @@ -221,6 +234,15 @@ jobs: run: | HOME=/builder ./setup.sh + - name: Add signing key + if: matrix.package_extension == 'apk' + id: signing_key + env: + SIGNING_KEY: ${{ secrets.EC_PRIVATE_KEY }} + working-directory: /builder + run: | + ([ -n "$SIGNING_KEY" ] && echo "$SIGNING_KEY" > private-key.pem) || true + - name: Build packages id: build env: @@ -235,14 +257,14 @@ jobs: ./scripts/feeds install -a -p youtubeUnblock make defconfig make package/youtubeUnblock/compile V=s - mv $(find ./bin -type f -name 'youtubeUnblock*.ipk') ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.ipk + mv $(find ./bin -type f -name "youtubeUnblock*.${{ matrix.package_extension }}") ./youtubeUnblock-$VERSION-$RELEASE-$SHA-${{ matrix.arch }}-${{ matrix.branch }}.${{ matrix.package_extension }} - name: Upload packages if: steps.build.outcome == 'success' uses: actions/upload-artifact@v4 with: name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }} - path: /builder/youtubeUnblock*.ipk + path: /builder/youtubeUnblock*.${{ matrix.package_extension }} if-no-files-found: error build-openwrt-luci: @@ -257,14 +279,6 @@ jobs: with: ref: 'openwrt' - - name: Prepare build - env: - VERSION: ${{ needs.prepare.outputs.version }} - RELEASE: ${{ needs.prepare.outputs.release }} - SHA: ${{ needs.prepare.outputs.sha }} - run: | - sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile - - name: Initilalize SDK id: init_sdk env: @@ -327,7 +341,7 @@ jobs: RELEASE: ${{ needs.prepare.outputs.release }} SHA: ${{ needs.prepare.outputs.sha }} run: | - sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION-$RELEASE-$SHA/" youtubeUnblock/Makefile + sed -i "s/PKG_REV:=.*$/PKG_REV:=$SHA/;s/PKG_VERSION:=.*$/PKG_VERSION:=$VERSION/;s/PKG_RELEASE:=.*$/PKG_RELEASE:=$RELEASE/;" youtubeUnblockEntware/Makefile - name: Build packages id: build From 4e4c58ea8e14c0f08878c8bcf37ed64d77fed704 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Sun, 1 Dec 2024 02:17:28 +0300 Subject: [PATCH 3/4] Update documentation for 24.10 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ea390b5..08e3192 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,8 @@ For Windows use [GoodbyeDPI by ValdikSS](https://github.com/ValdikSS/GoodbyeDPI) When you got the release package, you should install it. Go to your router interface, to *System->Software*, do *Update lists* and install youtubeUnblock via *install_package* button. Then, you should go to *System-Startup* menu and reload the firewall (You may also do it within *Services->youtubeUnblock* menu). +If you are on **24.10** you will get **UNTRUSTED SIGNATURE** error. Put youtubeUnblock.pem to `/etc/apk/keys/` or install youtubeUnblock with `--allow-untrusted` flag `apk add youtubeUnblock*.apk --allow-untrusted`. + To make it work you should register an iptables rule and install required kernel modules. The list of modules depends on the version of OpenWRT and which firewall do you use (iptables or nftables). For most modern versions of OpenWRT (v23.x, v22.x) you should use nftables rules, for older ones it depends, but typically iptables. The common dependency is From 6ea410123c23fec0069b020cc163e7fb14cac7b2 Mon Sep 17 00:00:00 2001 From: Vadim Vetrov Date: Thu, 19 Dec 2024 01:40:17 +0300 Subject: [PATCH 4/4] Add luci builder for apk --- .github/workflows/build-ci.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 6f1d548..51b12bb 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -270,8 +270,20 @@ jobs: build-openwrt-luci: needs: prepare runs-on: ubuntu-latest + strategy: + matrix: + branch: + - openwrt-23.05 + - SNAPSHOT + arch: + - x86_64 + include: + - branch: SNAPSHOT + package_extension: apk + - branch: openwrt-23.05 + package_extension: ipk container: - image: openwrt/sdk:x86_64-openwrt-23.05 + image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }} options: --user root steps: - name: Checkout @@ -289,6 +301,15 @@ jobs: run: | HOME=/builder ./setup.sh + - name: Add signing key + if: matrix.package_extension == 'apk' + id: signing_key + env: + SIGNING_KEY: ${{ secrets.EC_PRIVATE_KEY }} + working-directory: /builder + run: | + ([ -n "$SIGNING_KEY" ] && echo "$SIGNING_KEY" > private-key.pem) || true + - name: Build packages id: build env: @@ -303,14 +324,14 @@ jobs: ./scripts/feeds install -a -p youtubeUnblock make defconfig make package/luci-app-youtubeUnblock/compile V=s - mv $(find ./bin -type f -name 'luci-app-youtubeUnblock*.ipk') ./luci-app-youtubeUnblock-$VERSION-$RELEASE-$SHA.ipk + mv $(find ./bin -type f -name 'luci-app-youtubeUnblock*.${{ matrix.package_extension }}') ./luci-app-youtubeUnblock-$VERSION-$RELEASE-$SHA.${{ matrix.package_extension }} - name: Upload packages if: steps.build.outcome == 'success' uses: actions/upload-artifact@v4 with: - name: luci-app-youtubeUnblock - path: /builder/luci-app-youtubeUnblock*.ipk + name: luci-app-youtubeUnblock-${{ matrix.branch }} + path: /builder/luci-app-youtubeUnblock*.${{ matrix.package_extension }} if-no-files-found: error build-entware: @@ -388,5 +409,7 @@ jobs: title: 'Development build' files: | ./**/youtubeUnblock*.ipk + ./**/youtubeUnblock*.apk ./**/youtubeUnblock*.tar.gz ./**/luci-app-youtubeUnblock*.ipk + ./**/luci-app-youtubeUnblock*.apk