Box for Root
(BFR) is a Magisk, KernelSU, APatch, module that provides a suite of proxy tools, including clash
, sing-box
, v2ray
, hysteria
and xray
. It allows you to configure a transparent proxy on Android devices with root access.
- Support for multiple proxy tools:
clash
,sing-box
,v2ray
,hysteria
, andxray
. - Transparent proxy for Android with root access.
- Seamless integration with Magisk, KernelSU, and APatch.
- Manage proxy services with ease.
You can use the BFR Manager app (optional) to manage Box for Root on your device.
Note: If you receive continuous notifications, open Magisk Manager, navigate to SuperUser, search for
BoxForRoot
, and disable logs and notifications.
The core files of the module are stored in the following directories:
MODDIR=/data/adb/box
MODLOG=/data/adb/box/run
SETTINGS=/data/adb/box/settings.ini
Note: Before editing the
settings.ini
file located at/data/adb/box/settings.ini
, ensure that BFR is turned off to avoid configuration issues.
The following core services are collectively referred to as BFR. By default, the BFR service auto-starts after a system boot. You can manage the service through Magisk/KernelSU Manager App, with the service start taking a few seconds, and stopping it taking effect immediately.
su -c /data/adb/box/scripts/box.service start && su -c /data/adb/box/scripts/box.iptables enable
su -c /data/adb/box/scripts/box.iptables disable && su -c /data/adb/box/scripts/box.service stop
- When modifying any of the core configuration files, ensure that the tproxy-related configurations match the definitions in the /data/adb/box/settings.ini file.
- If your device has a public IP address, you can add that IP address to the internal network in the /data/adb/box/scripts/box.iptables file to prevent loopback traffic.
- The logs for the BFM service can be found in the directory /data/adb/box/run.
- Please note that modifying these files requires appropriate permissions. Make sure to carefully follow the instructions and validate any changes made to the configuration files.
You can run the following command to get other related operating instructions:
su -c /data/adb/box/scripts/box.tool
# usage: {check|geosub|geox|subs|upkernel|upxui|upyq|upcurl|reload|all}
su -c /data/adb/box/scripts/box.service
# usage: $0 {start|stop|restart|status|cron|kcron}
su -c /data/adb/box/scripts/box.iptables
# usage: $0 {enable|disable|renew}
Remove the module from Magisk/KernelSU/APatch Manager
and run the following command to wipe the data:
su -c rm -rf /data/adb/box
su -c rm -rf /data/adb/service.d/box_service.sh
su -c rm -rf /data/adb/modules/box_for_root
- CHIZI-0618/box4magisk for the original Box for Magisk module.
This project is licensed under the GPL-3.0 license - see the LICENSE file for details.