Find a file
2025-11-25 13:08:57 +01:00
.github/workflows feat: Include SHA256 checksum file in release artifacts 2025-11-02 03:08:12 +01:00
.vscode refactor: update STUN message filtering logic and improve workspace configuration 2025-11-09 14:35:51 +01:00
docs feat(docs): simplify web interface documentation and streamline quick start instructions 2025-11-17 22:22:46 +01:00
src fix: update changelog for version 1.18.3 and replace VirtualizedDomainsTable with DomainsTable 2025-11-25 13:08:57 +01:00
.codacy.yml refactor: enable TypeScript in Codacy configuration and ensure consistent base sub-directory 2025-11-07 19:38:04 +01:00
.gitignore refactor: enhance type safety and improve code clarity in settings and logging components 2025-11-07 20:41:47 +01:00
changelog.md fix: update changelog for version 1.18.3 and replace VirtualizedDomainsTable with DomainsTable 2025-11-25 13:08:57 +01:00
image.png fix(image): update image file to improve visual quality 2025-11-23 00:21:41 +01:00
install.sh fix(install): streamline backup binary removal process in remove_b4 function 2025-11-23 21:19:41 +01:00
LICENSE Initial commit 2025-08-07 12:15:59 +02:00
makefile feat: Update release workflow and improve architecture detection in installer script 2025-11-02 02:52:12 +01:00
readme.md Update readme.md 2025-11-25 11:21:33 +01:00
readme_ru.md Update readme_ru.md 2025-11-04 18:31:03 +01:00

B4

GitHub Release GitHub Downloads

[русский язык] [telegram]

Network packet processor that bypasses Deep Packet Inspection (DPI) using netfilter queue manipulation.

image B4 Telegram Group - join!

alt text

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:

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.