Bypasses YouTube detection systems that rely on SNI.
Bypasses YouTube detection systems that rely on SNI.
Bypasses YouTube detection systems that rely on SNI.
The program was primarily developed to bypass YouTube Outage in Russia.
The program should be used only for the YouTube platform. It is legal since access to YouTube is not officially restricted in Russia. You MUST NOT use the program for any other purpose. I respect all Russian laws and do not wish to break any.
Starting with a YouTube speedup for my laptop, this project grew into a standalone tool that unblocks YouTube on a wide variety of devices. This project has fulfilled my dream of creating a massive, highly reliable, open-source GitHub project that helps people. I value all your feedback, and that is the reason I continue to maintain it. I learned many things while developing it, such as aspects of the Linux kernel networking stack. It is truly rewarding to explore new technologies while developing a project for people. This experience is incomparable to that of working on a mere pet project.
So, please use it only for YouTube and only in accordance with the laws of your country.
If you have any questions, suggestions, or problems, feel free to open an issue.
You are also welcome to contact me directly using the links provided in my GitHub profile description; however, please contact me only if you have a special offer. For help with the program, it is preferable to make our conversation public by posting on GitHub Discussions.
The program is distributed under the GNU GPL v3 open-source license.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The program is for Linux only. It is also fully compatible with routers running OpenWRT.
The program is distributed in two version:
The program is compatible with routers based on OpenWRT, Entware(Keenetic/ASUS) and host machines. The program offers binaries via Github Actions. The binaries are also available via github releases. Use the latest pre-release for the most up to date build. Check out Github Actions if you want to see all the binaries compiled ever. You should know the arcitecture of your hardware to use binaries. On OpenWRT you can check it with command grep ARCH /etc/openwrt_release.
On both OpenWRT and Entware install the program with opkg. If you got read-only filesystem error you may unpack the binary manually or specify opkg path opkg -o <destdir>.
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. 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.
The common dependency is
kmod-nfnetlink-queue
but it is provided as dependency for another firewall packages.
So, if you are on iptables you should install:
kmod-ipt-nfqueue
iptables-mod-nfqueue
kmod-ipt-conntrack-extra
iptables-mod-conntrack-extra
and of course, iptables user-space app should be available.
On nftables the dependencies are:
kmod-nft-queue
kmod-nf-conntrack
Next step is to add required firewall rules.
For nftables on OpenWRT rules comes out-of-the-box and stored under /usr/share/nftables.d/ruleset-post/537-youtubeUnblock.nft. All you need is install requirements and do /etc/init.d/firewall reload. If no, go to Firewall configuration.
Now we go to the configuration. For OpenWRT here is configuration via UCI and LuCI available (CLI and GUI respectively).
For LuCI aka GUI aka web-interface of router you should install luci-app-youtubeUnblock package like you did it with the normal youtubeUnblock package. Note, that lists of official opkg feeds should be loaded (Do it with Update lists option).
If you got * pkg_hash_check_unresolved: cannot find dependency luci-lua-runtime for luci-app-youtubeUnblock error, you are using old openwrt. Install this dummy package. Check this comment for more details.
LuCI configuration lives in Services->youtubeUnblock section. It is self descriptive, with description for each flag. Note, that after you push Save & Apply button, the configuration is applied automatically and the service is restarted.
UCI configuration is available in /etc/config/youtubeUnblock file, in section youtubeUnblock.youtubeUnblock. You may pass any args as a string to parameter args, but before it disable interactive flags (You can configurate with it but it is a way harder and I recommend to use it only with luci-app-youtubeUnblock):
uci set youtubeUnblock.youtubeUnblock.conf_strat="args"
uci set youtubeUnblock.youtubeUnblock.args="--queue-num=537 --threads=1"
To save the configs you should do uci commit and then reload_config to restart youtubeUnblock
You can check the logs in CLI mode with logread -l 200 | grep youtubeUnblock command.
In CLI mode you will use youtubeUnblock as a normal init.d service:
for example, you can enable it with /etc/init.d/youtubeUnblock enable.
For Entware on Keenetic here is an installation guide (russian).
Install the binary with opkg install youtubeUnblock-*.ipk. After installation, the binary in /opt/bin and the init script in /opt/etc/init.d/S51youtubeUnblock will be available. To run the youtubeUnblock, simply run /opt/etc/init.d/S51youtubeUnblock start
Note, that you should feed the target kernel with nfnetlink_queue kernel module. The module may be disabled or even not present. Entware S51youtubeUnblock will try to insert kmods any way but if they are not provided by software, you should install them manually. AFAIK on keenetics here is a repository with modules compiled by customer. You can find them somewhere in the web interface of your device. On other routers you may want to do deeper research in that case and find your kmods. If you can't find anything, you may ask the customer for GPL codes of linux kernel (and may be even OpenWRT) and compile kmods manually.
You should insert the module with (this step may be omitted on Entware and OpenWRT):
modprobe nfnetlink_queue
On local host make sure to change FORWARD to OUTPUT chain in the following Firewall rulesets.
Copy youtubeUnblock.service to /usr/lib/systemd/system (you should change the path inside the file to the program position, for example /usr/bin/youtubeUnblock, also you may want to delete default iptables rule addition in systemd file to controll it manually). And run systemctl start youtubeUnblock.
On nftables you should put next nftables rules:
nft add chain inet fw4 youtubeUnblock '{ type filter hook postrouting priority mangle - 1; policy accept; }'
nft add rule inet fw4 youtubeUnblock 'tcp dport 443 ct original packets < 20 counter queue num 537 bypass'
nft add rule inet fw4 youtubeUnblock 'meta l4proto udp ct original packets < 9 counter queue
No open issues yet, or sync has not completed.