| .github/workflows | ||
| .vscode | ||
| docs | ||
| src | ||
| .codacy.yml | ||
| .gitignore | ||
| changelog.md | ||
| image.png | ||
| install.sh | ||
| LICENSE | ||
| makefile | ||
| readme.md | ||
| readme_ru.md | ||
B4
Network packet processor that bypasses Deep Packet Inspection (DPI) using netfilter queue manipulation.
Quick Install
Note
In some systems you need to run
sudo b4install.sh.
wget -O ~/b4install.sh https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh && chmod +x ~/b4install.sh && ~/b4install.sh
If something went wrong try to run it with the flag --sysinfo - this will diagnose the system
wget -O ~/b4install.sh https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh && chmod +x ~/b4install.sh && ~/b4install.sh --sysinfo
Or pass --help to get more information about the possible options.
wget -O ~/b4install.sh https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh && chmod +x ~/b4install.sh && ~/b4install.sh --help
Usage
# Systemd
sudo systemctl start b4
sudo systemctl enable b4
# OpenWRT
/etc/init.d/b4 restart
# Entware/MerlinWRT
/opt/etc/init.d/S99b4 restart
Web UI
http://your-device-ip:7000
Command Line
# Custom config
b4 --config /path/to/config.json
# Basic - manual domains
b4 --sni-domains youtube.com,netflix.com
# With geosite categories
b4 --geosite /etc/b4/geosite.dat --geosite-categories youtube,netflix
# Print help
b4 --help
``
### Building from Source
```bash
git clone https://github.com/daniellavrushin/b4.git
cd b4
# Build UI
cd src/http/ui
pnpm install && pnpm build
cd ../../..
# Build binary
make build
# All architectures
make build-all
# Or build specific
make linux-amd64
Geosite Integration
B4 supports v2ray/xray geosite.dat files from various sources:
# Loyalsoldier
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
# RUNET Freedom
wget https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geosite.dat
# Nidelon
wget https://github.com/Nidelon/ru-block-v2ray-rules/releases/latest/download/geosite.dat
Place the file in /etc/b4/geosite.dat and configure categories:
sudo b4 --geosite /etc/b4/geosite.dat --geosite-categories youtube,netflix,facebook
Tip
All these settings can be configured via the web interface.
Contributing
Contributions are accepted through GitHub pull requests.
Credits
Based on research from:
- youtubeUnblock - C-based DPI bypass
- GoodbyeDPI - Windows DPI circumvention
- zapret - Advanced DPI bypass techniques
License
This project is provided for educational purposes. Users are responsible for compliance with applicable laws and regulations. The authors are not responsible for misuse of this software.
