mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2026-01-27 12:40:36 +03:00
Compare commits
8 Commits
v1.1.0
...
openwrt_24
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
883346b808 | ||
|
|
28d24c80ef | ||
|
|
4761034802 | ||
|
|
6c3ed7e5e9 | ||
|
|
da650bd09f | ||
|
|
07334c598d | ||
|
|
b35b6ed29c | ||
|
|
2d579d5479 |
67
.github/workflows/build-ci.yml
vendored
67
.github/workflows/build-ci.yml
vendored
@@ -168,6 +168,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
branch:
|
branch:
|
||||||
- openwrt-23.05
|
- openwrt-23.05
|
||||||
|
- SNAPSHOT
|
||||||
|
include:
|
||||||
|
- branch: SNAPSHOT
|
||||||
|
package_extension: apk
|
||||||
|
- branch: openwrt-23.05
|
||||||
|
package_extension: ipk
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
- aarch64_cortex-a53
|
- aarch64_cortex-a53
|
||||||
- aarch64_cortex-a72
|
- aarch64_cortex-a72
|
||||||
@@ -195,6 +202,9 @@ jobs:
|
|||||||
- mipsel_74kc
|
- mipsel_74kc
|
||||||
- mipsel_mips32
|
- mipsel_mips32
|
||||||
- x86_64
|
- x86_64
|
||||||
|
exclude:
|
||||||
|
- branch: SNAPSHOT
|
||||||
|
arch: arm_mpcore
|
||||||
container:
|
container:
|
||||||
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
|
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -210,7 +220,8 @@ jobs:
|
|||||||
RELEASE: ${{ needs.prepare.outputs.release }}
|
RELEASE: ${{ needs.prepare.outputs.release }}
|
||||||
SHA: ${{ needs.prepare.outputs.sha }}
|
SHA: ${{ needs.prepare.outputs.sha }}
|
||||||
run: |
|
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
|
- name: Initilalize SDK
|
||||||
id: init_sdk
|
id: init_sdk
|
||||||
@@ -222,6 +233,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
HOME=/builder ./setup.sh
|
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
|
- name: Build packages
|
||||||
id: build
|
id: build
|
||||||
env:
|
env:
|
||||||
@@ -236,21 +256,33 @@ jobs:
|
|||||||
./scripts/feeds install -a -p youtubeUnblock
|
./scripts/feeds install -a -p youtubeUnblock
|
||||||
make defconfig
|
make defconfig
|
||||||
make package/youtubeUnblock/compile V=s
|
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
|
- name: Upload packages
|
||||||
if: steps.build.outcome == 'success'
|
if: steps.build.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }}
|
name: youtubeUnblock-${{ matrix.branch }}-${{ matrix.arch }}
|
||||||
path: /builder/youtubeUnblock*.ipk
|
path: /builder/youtubeUnblock*.${{ matrix.package_extension }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-openwrt-luci:
|
build-openwrt-luci:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: ubuntu-latest
|
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:
|
container:
|
||||||
image: openwrt/sdk:x86_64-openwrt-23.05
|
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
|
||||||
options: --user root
|
options: --user root
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -258,14 +290,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: 'openwrt'
|
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
|
- name: Initilalize SDK
|
||||||
id: init_sdk
|
id: init_sdk
|
||||||
env:
|
env:
|
||||||
@@ -276,6 +300,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
HOME=/builder ./setup.sh
|
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
|
- name: Build packages
|
||||||
id: build
|
id: build
|
||||||
env:
|
env:
|
||||||
@@ -290,14 +323,14 @@ jobs:
|
|||||||
./scripts/feeds install -a -p youtubeUnblock
|
./scripts/feeds install -a -p youtubeUnblock
|
||||||
make defconfig
|
make defconfig
|
||||||
make package/luci-app-youtubeUnblock/compile V=s
|
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
|
- name: Upload packages
|
||||||
if: steps.build.outcome == 'success'
|
if: steps.build.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: luci-app-youtubeUnblock
|
name: luci-app-youtubeUnblock-${{ matrix.branch }}
|
||||||
path: /builder/luci-app-youtubeUnblock*.ipk
|
path: /builder/luci-app-youtubeUnblock*.${{ matrix.package_extension }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-entware:
|
build-entware:
|
||||||
@@ -328,7 +361,7 @@ jobs:
|
|||||||
RELEASE: ${{ needs.prepare.outputs.release }}
|
RELEASE: ${{ needs.prepare.outputs.release }}
|
||||||
SHA: ${{ needs.prepare.outputs.sha }}
|
SHA: ${{ needs.prepare.outputs.sha }}
|
||||||
run: |
|
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
|
- name: Build packages
|
||||||
id: build
|
id: build
|
||||||
@@ -375,5 +408,7 @@ jobs:
|
|||||||
title: 'Development build'
|
title: 'Development build'
|
||||||
files: |
|
files: |
|
||||||
./**/youtubeUnblock*.ipk
|
./**/youtubeUnblock*.ipk
|
||||||
|
./**/youtubeUnblock*.apk
|
||||||
./**/youtubeUnblock*.tar.gz
|
./**/youtubeUnblock*.tar.gz
|
||||||
./**/luci-app-youtubeUnblock*.ipk
|
./**/luci-app-youtubeUnblock*.ipk
|
||||||
|
./**/luci-app-youtubeUnblock*.apk
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
USPACE_TARGETS := default all install uninstall dev run_dev
|
USPACE_TARGETS := default all install uninstall dev run_dev
|
||||||
KMAKE_TARGETS := kmake kload kunload kreload xmod xtclean
|
KMAKE_TARGETS := kmake kload kunload kreload xmod xtclean
|
||||||
|
|
||||||
PKG_VERSION := 1.1.0
|
PKG_VERSION := 1.1.1
|
||||||
PKG_RELEASE := 1
|
PKG_RELEASE := 1
|
||||||
|
|
||||||
PKG_FULLVERSION := $(PKG_VERSION)-$(PKG_RELEASE)
|
PKG_FULLVERSION := $(PKG_VERSION)-$(PKG_RELEASE)
|
||||||
|
|||||||
@@ -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).
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
print_cnf_buf("--seg2delay=%d", section->seg2_delay);
|
||||||
|
} else {
|
||||||
|
print_cnf_buf("--fake-sni=0");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print_cnf_buf("--tls=disabled");
|
print_cnf_buf("--tls=disabled");
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ enum {
|
|||||||
.fragmentation_strategy = FRAGMENTATION_STRATEGY, \
|
.fragmentation_strategy = FRAGMENTATION_STRATEGY, \
|
||||||
.faking_strategy = FAKING_STRATEGY, \
|
.faking_strategy = FAKING_STRATEGY, \
|
||||||
.faking_ttl = FAKE_TTL, \
|
.faking_ttl = FAKE_TTL, \
|
||||||
.fake_sni = 1, \
|
.fake_sni = 0, \
|
||||||
.fake_sni_seq_len = 1, \
|
.fake_sni_seq_len = 1, \
|
||||||
.fake_sni_type = FAKE_PAYLOAD_DEFAULT, \
|
.fake_sni_type = FAKE_PAYLOAD_DEFAULT, \
|
||||||
.fake_custom_pkt = NULL, \
|
.fake_custom_pkt = NULL, \
|
||||||
|
|||||||
@@ -345,6 +345,15 @@ int process_tcp_packet(const struct section_config_t *section, const uint8_t *ra
|
|||||||
ipd_offset = target_sni_offset;
|
ipd_offset = target_sni_offset;
|
||||||
mid_offset = ipd_offset + vrd.target_sni_len / 2;
|
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];
|
size_t poses[2];
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
|||||||
4
youtubeUnblock.pem
Normal file
4
youtubeUnblock.pem
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoeHyI7xqf2Y5weRscJxUy/BRoKqT
|
||||||
|
2dE9xFsZ2HKBTd2UMMkOwca+/BDXRZlxWGvcVNhDyLY9VGnZniF2JaH+Fw==
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
Reference in New Issue
Block a user