You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the module, download the appropriate core file for your device's architecture and place it in the /data/adb/box/bin/ directory, or execute:
32
+
33
+
```shell
34
+
su -c /data/adb/box/scripts/box.tool upcore
35
+
```
36
+
37
+
## konfigurasi
38
+
- bin_name:
39
+
- clash
40
+
- xray
41
+
- v2ray
42
+
- sing-box
43
+
44
+
- Each core works in the directory `/data/adb/box/bin/${bin_name}`, and the core name is determined by `bin_name` in the file `BFM`.
45
+
- Each core configuration file needs to be customized by the user, and the scripts will check the validity of the configuration, and the check result will be saved in the file `/data/adb/box/run/runs.log.`
46
+
- Tip: `clash` and `sing-box` come with ready-to-work default configurations with the transparent proxy script. For further configuration, see the official documentation. Address: [dokumen clash](https://github.com/Dreamacro/clash/wiki/configuration), [dokumen sing-box](https://sing-box.sagernet.org/configuration/outbound/)
**Layanan inti berikut secara kolektif disebut sebagai `BFM`**
53
+
- The following core services are collectively referred to as `BFM`
54
+
- You can enable or disable the module through the Magisk Manager application **in real time** to start or stop the `BFM` service, **without restarting the device**. Starting the service may take a few seconds, and stopping the service can take effect immediately.
55
+
56
+
#### Select applications (APPs) that require proxy
57
+
-`BFM` defaults to proxying all applications (APPs) for all Android users.
58
+
- If you want `BFM` to proxy all applications (APP), except for certain ones, please open the file `/data/adb/box/settings.ini` and change the value of `proxy_mode` to `blacklist` (default), add packages to `packages_list`, for example: `packages_list=("com.termux" "org.telegram.messenger")`
59
+
- Use `whitelist` if you only want to proxy certain applications (APP).
60
+
- When the value of `proxy_mode` is `core/tun`, transparent proxy will not work, only the corresponding kernel will start, which can be used to support TUN, currently only `clash` and `sing-box` are available.
61
+
62
+
### Advanced usage
63
+
#### Changing proxy mode
64
+
-`BFM` uses `TPROXY` to transparently proxy TCP + UDP (default). If it detects that the device does not support TPROXY, open `/data/adb/box/settings.ini` and change `network_mode="redirect"` to use `redirect` for TCP proxy only.
65
+
- Open the file `/data/adb/box/settings.ini`, change the value of network_mode to redirect, tproxy, or mixed.
66
+
- redirect: `redirec TCP only.`
67
+
- tproxy: `tproxy TCP + UDP.`
68
+
- mixed: `redirec TCP + tun UDP.`
69
+
70
+
#### Bypass transparent proxy when connecting to Wi-Fi or hotspot
71
+
-`BFM` transparently proxies localhost and hotspot (including USB tethering) by default.
72
+
- Open the file `/data/adb/box/settings.ini`, modify `ignore_out_list` and add `wlan+`, then transparent proxy will bypass wlan, and hotspot won't connect to the proxy.
73
+
- Open the file `/data/adb/box/settings.ini`, modify `ap_list` and add `wlan+`. `BFM` will proxy the hotspot (for MediaTek devices, it may be ap+ / wlan+).
74
+
- Use the ifconfig command in the terminal to find out the name of the AP.
75
+
76
+
#### Enter manual mode
77
+
- If you want to fully control `BFM` by running commands, just create a new file `/data/adb/box/manual`. In this case, the `BFM` service will not start automatically when your device is turned on, and you also cannot set the start or stop of the service through the Magisk Manager app.
78
+
79
+
#### Starting and stopping the management service
80
+
The `BFM` service script is /data/adb/box/scripts/box.service
81
+
82
+
- Start `BFM`:
83
+
```shell
84
+
su -c /data/adb/box/scripts/box.service start
85
+
```
86
+
- Stop `BFM`:
87
+
```shell
88
+
su -c /data/adb/box/scripts/box.service stop
89
+
```
90
+
91
+
- The terminal will print logs and output them to a log file simultaneously.
92
+
93
+
#### Manage whether transparent proxy is enabled
94
+
- The transparent proxy script is `/data/adb/box/scripts/box.tproxy`
95
+
96
+
- Enable transparent proxy:
97
+
```shell
98
+
su -c /data/adb/box/scripts/box.tproxy enable
99
+
```
100
+
101
+
- Disable transparent proxy:
102
+
```shell
103
+
su -c /data/adb/box/scripts/box.tproxy disable
104
+
```
105
+
106
+
## Other instructions
107
+
- When modifying any of the core configuration files, please ensure that the tproxy related configurations are consistent with the definitions in the `/data/adb/box/settings.ini` file.
108
+
- If the machine has a **public IP address**, add the IP to the intranet in the `/data/adb/box/settings.ini` file to prevent traffic loops.
109
+
- Logs for the `BFM` service can be found in the `/data/adb/box/run` directory.
110
+
111
+
112
+
## Uninstall
113
+
- Removing the installation of this module from Magisk Manager will remove `/data/adb/service.d/box_service.sh` and keep the `BFM` data directory at /data/adb/box.
114
+
- You can use the following commands to remove the `BFM` data:
0 commit comments