Find a file
2025-11-13 01:03:06 +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 Add SVG illustration and TypeScript configuration file 2025-11-12 16:55:16 +01:00
src fix: update placeholder URLs in GeoSettings and rename Bypass Domain to Bypass IP in TargetSettings 2025-11-13 01:03:06 +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 to include fix for Web UI update process 2025-11-13 00:57:13 +01:00
image.png Implement feature X to enhance user experience and fix bug Y in module Z 2025-10-29 19:59:19 +01:00
install.sh fix: improve geosite path extraction in perform_update function 2025-11-13 00:56:25 +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 refactor: update credits section for clarity and conciseness 2025-11-09 20:12:30 +01:00
readme_ru.md Update readme_ru.md 2025-11-04 18:31:03 +01:00

B4

GitHub Release GitHub Downloads

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

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

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.