Find a file
2026-01-11 00:59:54 +01:00
.github/workflows feat(release): add support for mips_softfloat and mipsle_softfloat architectures 2025-12-30 23:26:28 +01:00
.tasks feat: Enhance build and task management with new configurations and scripts 2025-11-29 15:20:00 +01:00
.vscode feat(incoming): enhance incoming packet handling with new strategies and configurations 2025-12-31 21:39:12 +01:00
docs feat(orientation): add quick start guide and related images for Facebook unblocking 2025-12-03 23:16:37 +01:00
installer feat(iptables): add support for iptables multiport module and improve rule handling 2026-01-11 00:45:38 +01:00
src feat(iptables): add support for iptables multiport module and improve rule handling 2026-01-11 00:45:38 +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 feat: Enhance build and task management with new configurations and scripts 2025-11-29 15:20:00 +01:00
changelog.md feat(changelog): update to version 1.31.0 with TCP MD5 support and iptables multiport module enhancements 2026-01-11 00:59:54 +01:00
install.sh feat(iptables): add support for iptables multiport module and improve rule handling 2026-01-11 00:45:38 +01:00
LICENSE Initial commit 2025-08-07 12:15:59 +02:00
makefile feat(architecture): enhance MIPS architecture detection with softfloat support 2025-12-30 11:41:53 +01:00
readme.md Update readme.md 2025-12-01 01:01:22 +01:00
readme_ru.md Update readme_ru.md 2025-11-25 15:41:22 +03:00
Taskfile.yml feat: Enhance build and task management with new configurations and scripts 2025-11-29 15:20:00 +01:00

B4

GitHub Release GitHub Downloads

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

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

image

Requirements

  • Linux-system (desktop, server or router)
  • Root-access (sudo)

That's it. The installer will take care of the rest

Installation

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

Installer options

# Install latest b4 version
./b4install.sh

# Show help message
./b4install.sh -h

# Show system diagnostics and b4 status
./b4install.sh --sysinfo

# Install specific version
./b4install.sh v1.10.0

# Quiet mode (suppress output except for errors)
./b4install.sh --quiet

# Specify geosite.dat source URL and destination
./b4install.sh --geosite-src=--geosite-src=https://example.com/geosite.dat --geosite-dst=/opt/etc/b4

# Update b4 to latest version
./b4install.sh --update

# Uninstall b4
./b4install.sh --remove

Building from Source

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
make linux-arm64
make linux-armv7

Usage

Starting B4


# Standard Linux (systemd)
sudo systemctl start b4
sudo systemctl enable b4 # Start on load

# OpenWRT
/etc/init.d/b4 restart # start | stop

# Entware/MerlinWRT
/opt/etc/init.d/S99b4 restart # start | stop

Web UI

http://your-device-ip:7000

Command Line


# Print help
b4 --help

# Basic - manual domains
b4 --sni-domains youtube.com,netflix.com

# With geosite categories
b4 --geosite /etc/b4/geosite.dat --geosite-categories youtube,netflix

# Custom config
b4 --config /path/to/config.json

Web interface

The web interface is available at http://your-ip:7000 (default port, can be changed in config file).

Features:

  • Realtime metrics (connections, packets, bandwidth)
  • Logs streaming with filtering and keybinds (p to pause streaming, del to clear logs)
  • Domain/ip configuration on the go (Add domain or ip to a set by clicking it in the Domains tab)
  • Quick domain tests and domain-specific bypass strat discovery
  • ipinfo.io api integration for ASN scanning
  • Custom payload capturing for faking

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.