{"id":34733317,"url":"https://github.com/daniellavrushin/b4","last_synced_at":"2026-05-22T00:21:22.180Z","repository":{"id":308749957,"uuid":"1033771493","full_name":"DanielLavrushin/b4","owner":"DanielLavrushin","description":"Network packet processor with a friendly UI for circumventing Deep Packet Inspection (DPI) systems.","archived":false,"fork":false,"pushed_at":"2026-04-27T14:29:04.000Z","size":20048,"stargazers_count":1307,"open_issues_count":9,"forks_count":50,"subscribers_count":12,"default_branch":"main","last_synced_at":"2026-04-27T15:20:15.394Z","etag":null,"topics":["asuswrt","asuswrt-merlin","censorship","censorship-free","dpi","geosite","openwrt","unblock","xray","xray-core","youtube"],"latest_commit_sha":null,"homepage":"https://daniellavrushin.github.io/b4/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielLavrushin.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-07T10:15:59.000Z","updated_at":"2026-04-27T14:29:00.000Z","dependencies_parsed_at":"2026-03-09T14:02:51.042Z","dependency_job_id":null,"html_url":"https://github.com/DanielLavrushin/b4","commit_stats":null,"previous_names":["daniellavrushin/byebyebigbrother","daniellavrushin/b4"],"tags_count":106,"template":false,"template_full_name":null,"purl":"pkg:github/DanielLavrushin/b4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielLavrushin%2Fb4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielLavrushin%2Fb4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielLavrushin%2Fb4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielLavrushin%2Fb4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielLavrushin","download_url":"https://codeload.github.com/DanielLavrushin/b4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielLavrushin%2Fb4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32534980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asuswrt","asuswrt-merlin","censorship","censorship-free","dpi","geosite","openwrt","unblock","xray","xray-core","youtube"],"created_at":"2025-12-25T03:18:30.008Z","updated_at":"2026-05-02T13:05:58.981Z","avatar_url":"https://github.com/DanielLavrushin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B4\n\n![GitHub Release](https://img.shields.io/github/v/release/daniellavrushin/b4)\n![GitHub Downloads](https://img.shields.io/github/downloads/daniellavrushin/b4/total)\n\n[[Documentation](https://daniellavrushin.github.io/b4/)] [[Документация (RU)](https://daniellavrushin.github.io/b4/ru/)] [[Telegram](https://t.me/byebyebigbro)]\n\nNetwork packet processor that bypasses Deep Packet Inspection (DPI) using netfilter queue manipulation.\n\n\u003cimg width=\"1187\" height=\"787\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3e4c105d-5b28-4e93-ab54-6d92338b1293\" /\u003e\n\n## Requirements\n\n- Linux-system (desktop, server or router)\n- Root-access (sudo)\n\nThat's it. The installer will take care of the rest\n\n## Installation\n\n\u003e [!NOTE]\n\u003e In some systems you need to run `sudo b4install.sh`.\n\nWith wget:\n\n```bash\nwget -qO- https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh\n```\n\nWith curl:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh\n```\n\nIf something went wrong try to run it with the flag `--sysinfo` - this will diagnose the system\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --sysinfo\n```\n\nOr pass `--help` to get more information about the possible options.\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --help\n```\n\nTo update B4:\n\n```bash\n#to latest version\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --update\n\n#to specific version\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --update v1.43.0\n\n#update silently\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --update --quiet\n\n```\n\nTo remove B4:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/DanielLavrushin/b4/main/install.sh | sh -s -- --remove\n```\n\n### Installer options\n\n```bash\n# Install latest b4 version\n./install.sh\n\n# Show help message\n./install.sh -h\n\n# Show system diagnostics and b4 status\n./install.sh --sysinfo\n\n# Install specific version\n./install.sh v1.10.0\n\n# Quiet mode (suppress output except for errors)\n./install.sh --quiet\n\n# Specify geosite.dat source URL and destination\n./install.sh --geosite-src=--geosite-src=https://example.com/geosite.dat --geosite-dst=/opt/etc/b4\n\n# Update b4 to latest version\n./install.sh --update\n\n# Uninstall b4\n./install.sh --remove\n```\n\n### Building from Source\n\n```bash\ngit clone https://github.com/daniellavrushin/b4.git\ncd b4\n\n# Build UI\nmake build-ui\n\n# Build binary\nmake build\n\n# All architectures\nmake build-all\n\n# Or build specific\nmake linux-amd64\nmake linux-arm64\nmake linux-armv7\n```\n\n## Docker\n\n### Quick Start\n\n```bash\ndocker run --network host \\\n  --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_MODULE \\\n  -v /etc/b4:/etc/b4 \\\n  lavrushin/b4:latest --config /opt/etc/b4/b4.json\n```\n\nWeb UI: \u003chttp://localhost:7000\u003e\n\n### Docker Compose\n\n```yaml\nservices:\n  b4:\n    image: lavrushin/b4:latest\n    container_name: b4\n    network_mode: host\n    cap_add:\n      - NET_ADMIN\n      - NET_RAW\n      - SYS_MODULE\n    volumes:\n      - ./config:/etc/b4\n    command: [\"--config\", \"/etc/b4/b4.json\"]\n    restart: unless-stopped\n```\n\n### Docker Requirements\n\n- **Linux host only** — b4 uses netfilter queue (NFQUEUE) which is a Linux kernel feature\n- `--network host` is mandatory — b4 must access the host network stack directly\n- Capabilities: `NET_ADMIN` (firewall rules), `NET_RAW` (raw sockets), `SYS_MODULE` (kernel module loading)\n- Host kernel must have `nfqueue` support (`xt_NFQUEUE`, `nf_conntrack` modules)\n\n## Usage\n\n### Starting B4\n\n```bash\n\n# Standard Linux (systemd)\nsudo systemctl start b4\nsudo systemctl enable b4 # Start on load\n\n# OpenWRT\n/etc/init.d/b4 restart # start | stop\n\n# Entware/MerlinWRT\n/opt/etc/init.d/S99b4 restart # start | stop\n```\n\n### Web UI\n\n```text\nhttp://your-device-ip:7000\n```\n\n### Command Line\n\n```bash\n\n# Print help\nb4 --help\n\n# Basic - manual domains\nb4 --sni-domains youtube.com,netflix.com\n\n# With geosite categories\nb4 --geosite /etc/b4/geosite.dat --geosite-categories youtube,netflix\n\n# Custom config\nb4 --config /path/to/config.json\n```\n\n## Web interface\n\nThe web interface is available at `http://your-ip:7000` (default port, can be changed in `config` file).\n\n**Features:**\n\n- Realtime metrics (connections, packets, bandwidth)\n- Logs streaming with filtering and keybinds (p to pause streaming, del to clear logs)\n- Domain/ip configuration on the go (Add domain or ip to a set by clicking it in the Domains tab)\n- Quick domain tests and domain-specific bypass strat discovery\n- ipinfo.io api integration for ASN scanning\n- Custom payload capturing for faking\n\n## HTTPS / TLS Support\n\nYou can enable HTTPS for the web interface in the Web UI under **Settings \u003e Network Configuration \u003e Web Server** (TLS Certificate / TLS Key fields), or by setting `tls_cert` and `tls_key` in the config JSON:\n\n```json\n{\n  \"system\": {\n    \"web_server\": {\n      \"tls_cert\": \"/path/to/server.crt\",\n      \"tls_key\": \"/path/to/server.key\"\n    }\n  }\n}\n```\n\nThe installer automatically detects router certificates on **OpenWrt** (uhttpd) and **Asus Merlin** and enables HTTPS in the config if they are found.\n\n## SOCKS5 Proxy\n\nB4 includes a built-in SOCKS5 proxy server. Applications that support SOCKS5 (browsers, curl, torrent clients, etc.) can route traffic through B4 without any system-wide configuration.\n\nEnable it in the Web UI under **Settings \u003e Network Configuration \u003e SOCKS5 Server**, or in the config JSON:\n\n```json\n{\n  \"system\": {\n    \"socks5\": {\n      \"enabled\": true,\n      \"port\": 1080,\n      \"bind_address\": \"0.0.0.0\",\n      \"username\": \"\",\n      \"password\": \"\"\n    }\n  }\n}\n```\n\nLeave `username` and `password` empty for no authentication.\n\n**Examples:**\n\n```bash\n# curl\ncurl --socks5 127.0.0.1:1080 https://example.com\n\n# Firefox: Preferences \u003e Network Settings \u003e Manual proxy\n# SOCKS Host: 127.0.0.1, Port: 1080, SOCKS v5\n\n# Git\ngit config --global http.proxy socks5://127.0.0.1:1080\n```\n\n\u003e [!NOTE]\n\u003e Restart B4 after changing SOCKS5 settings.\n\n## API Documentation (Swagger)\n\nB4 provides interactive REST API documentation via Swagger UI. To enable, add to your `b4.json`:\n\n```json\n{\n  \"system\": {\n    \"web_server\": {\n      \"swagger\": true\n    }\n  }\n}\n```\n\nAfter restarting B4, open:\n\n```text\nhttp://your-device-ip:7000/swagger/\n```\n\n\u003e [!TIP]\n\u003e If web authentication is enabled, call `POST /api/auth/login` to get a token first, then click **Authorize** in Swagger UI and enter `Bearer {your_token}`.\n\n## Geosite Integration\n\nB4 supports [v2ray/xray `geosite.dat`](https://github.com/v2fly/domain-list-community) files from various sources:\n\n```bash\n# Loyalsoldier\nwget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat\n\n# RUNET Freedom\nwget https://raw.githubusercontent.com/runetfreedom/russia-v2ray-rules-dat/release/geosite.dat\n```\n\nPlace the file in `/etc/b4/geosite.dat` and configure categories:\n\n```bash\nsudo b4 --geosite /etc/b4/geosite.dat --geosite-categories youtube,netflix,facebook\n```\n\n\u003e [!TIP]\n\u003e All these settings can be configured via the web interface.\n\n## Contributing\n\nContributions are accepted through GitHub pull requests.\n\n## Credits\n\nBased on research from:\n\n- [youtubeUnblock](https://github.com/Waujito/youtubeUnblock) - C-based DPI bypass\n- [GoodbyeDPI](https://github.com/ValdikSS/GoodbyeDPI) - Windows DPI circumvention\n- [zapret](https://github.com/bol-van/zapret) - Advanced DPI bypass techniques\n- [dpi-detector](https://github.com/Runnin4ik/dpi-detector) - DPI/TSPU detection techniques\n\n## License\n\nThis project is provided for educational purposes. Users are responsible for compliance with applicable laws and regulations.\nThe authors are not responsible for misuse of this software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniellavrushin%2Fb4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniellavrushin%2Fb4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniellavrushin%2Fb4/lists"}