8 Commits

Author SHA1 Message Date
Vadim Vetrov
883346b808 Add luci builder for apk 2025-12-28 13:42:49 +03:00
Vadim Vetrov
28d24c80ef Update documentation for 24.10 2025-12-28 13:42:49 +03:00
Vadim Vetrov
4761034802 Update workflow for openwrt 24.10 2025-12-28 13:42:49 +03:00
Vadim Vetrov
6c3ed7e5e9 Add signing public key
The key used primarily for OpenWRT apk
2025-12-28 13:42:48 +03:00
Vadim Vetrov
da650bd09f Bump version 2025-12-28 12:56:11 +03:00
Vadim Vetrov
07334c598d Disable fake_sni parameter by default.
It seems like youtubeUnblock works even without --fake-sni
2025-12-27 17:46:25 +03:00
Vadim Vetrov
b35b6ed29c Update default SNI domain
Relates to #312
2025-11-22 16:24:42 +03:00
Vadim Vetrov
2d579d5479 Bump version
See branch openwrt
2025-08-15 08:39:28 +03:00
7 changed files with 69 additions and 19 deletions

View File

@@ -168,6 +168,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
@@ -195,6 +202,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
@@ -210,7 +220,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
@@ -222,6 +233,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:
@@ -236,21 +256,33 @@ 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:
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
@@ -258,14 +290,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:
@@ -276,6 +300,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:
@@ -290,14 +323,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:
@@ -328,7 +361,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/" youtubeUnblockEntware/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
@@ -375,5 +408,7 @@ jobs:
title: 'Development build'
files: |
./**/youtubeUnblock*.ipk
./**/youtubeUnblock*.apk
./**/youtubeUnblock*.tar.gz
./**/luci-app-youtubeUnblock*.ipk
./**/luci-app-youtubeUnblock*.apk

View File

@@ -1,7 +1,7 @@
USPACE_TARGETS := default all install uninstall dev run_dev
KMAKE_TARGETS := kmake kload kunload kreload xmod xtclean
PKG_VERSION := 1.1.0
PKG_VERSION := 1.1.1
PKG_RELEASE := 1
PKG_FULLVERSION := $(PKG_VERSION)-$(PKG_RELEASE)

View File

@@ -72,7 +72,7 @@ On both OpenWRT and Entware install the program with opkg. If you got read-only
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).
Since OpenWRT **main** branch switched to apk instead of opkg, but this is not released yet, here is not deploys for apk in **Releases**. But **apk is supported** in PR #196.
Since OpenWRT **main** branch switched to apk instead of opkg, but this is not released yet, here is not deploys for apk in **Releases**. But **apk is supported** in PR #196. Note, that 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.

View File

@@ -1057,6 +1057,8 @@ static size_t print_config_section(const struct section_config_t *section, char
}
print_cnf_buf("--seg2delay=%d", section->seg2_delay);
} else {
print_cnf_buf("--fake-sni=0");
}
} else {
print_cnf_buf("--tls=disabled");

View File

@@ -241,7 +241,7 @@ enum {
.fragmentation_strategy = FRAGMENTATION_STRATEGY, \
.faking_strategy = FAKING_STRATEGY, \
.faking_ttl = FAKE_TTL, \
.fake_sni = 1, \
.fake_sni = 0, \
.fake_sni_seq_len = 1, \
.fake_sni_type = FAKE_PAYLOAD_DEFAULT, \
.fake_custom_pkt = NULL, \

View File

@@ -345,6 +345,15 @@ int process_tcp_packet(const struct section_config_t *section, const uint8_t *ra
ipd_offset = target_sni_offset;
mid_offset = ipd_offset + vrd.target_sni_len / 2;
// hardcode googlevideo.com split
// googlevideo domains are very long, so
// it is possible for the entire domain to not be
// splitted (split goes for subdomain)
if (vrd.target_sni_len > 30) {
mid_offset = ipd_offset +
vrd.target_sni_len - 12;
}
size_t poses[2];
int cnt = 0;

4
youtubeUnblock.pem Normal file
View File

@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoeHyI7xqf2Y5weRscJxUy/BRoKqT
2dE9xFsZ2HKBTd2UMMkOwca+/BDXRZlxWGvcVNhDyLY9VGnZniF2JaH+Fw==
-----END PUBLIC KEY-----