Use sing-box, clash, v2ray, xray tunnel proxy on Android devices.
Shell
1,917
157 commits
updated Sep 30, 2026
This project is a Magisk / KernelSU / APatch module designed to deploy various proxy cores on Android devices, including clash, mihomo, sing-box, v2ray, xray, and hysteria.
Supported transparent proxy modes:
This project essentially combines a proxy core launcher with AndroidTProxyShell to implement transparent proxying.
This project is not responsible for device bricking, data corruption, or any other hardware/software issues.
Important Warning: Please ensure your configuration file does not cause traffic looping, otherwise it may lead to infinite device reboots!
If you are not familiar with proxy configuration, it is recommended to first use user-friendly apps (such as ClashForAndroid, sing-box for Android, v2rayNG, SagerNet, etc.) to learn the basic concepts.
Note: The module does not include any proxy core binary files.
After installation, please manually download the core executable files for your device architecture and place them in the /data/adb/box/bin/ directory.
Core working directory: /data/adb/box/<core_name>
The core is determined by the bin_name variable in /data/adb/box/scripts/box.config. Available options:
sing-box (recommended, default)clashmihomoxrayv2rayhysteriaTip: mihomo and sing-box come with default configuration files that are pre-configured to work with transparent proxy. It is recommended to directly edit the proxy-providers or outbounds sections to add your nodes.
For advanced configuration, please refer to the official documentation:
The module will automatically check the validity of the configuration file, with results saved in /data/adb/box/run/check.log.
The following are the key options in /data/adb/box/scripts/tproxy.conf. Pay special attention to correctly configuring the *_INTERFACE variables (e.g., MOBILE_INTERFACE="rmnet_data+", WIFI_INTERFACE="wlan0", HOTSPOT_INTERFACE="wlan2", USB_INTERFACE="rndis+") to match your device's actual interface names (check with ifconfig or ip link).
| Configuration Item | Default Value | Description |
|---|---|---|
CORE_USER_GROUP | root:net_admin | User and group under which the proxy core runs. Advanced users can customize this (requires setcap support). Must be consistent with the box_user_group variable in box.config |
PROXY_TCP_PORT / PROXY_UDP_PORT | 1536 | Transparent proxy listening port |
PROXY_MODE | 0 | Proxy mode: 0=auto (TPROXY preferred), 1=TPROXY, 2=REDIRECT, any other value (only start the core to support native TUN) |
DNS_HIJACK_ENABLE | 1 | DNS hijacking (0=disable, 1=enable TPROXY, 2=enable REDIRECT; no need to change unless necessary) |
DNS_PORT | 1053 | DNS listening port |
MOBILE_INTERFACE | rmnet_data+ | Mobile data interface name |
WIFI_INTERFACE | wlan0 | WiFi interface name |
HOTSPOT_INTERFACE | wlan2 | Hotspot interface name |
USB_INTERFACE | rndis+ | USB tethering interface name |
PROXY_MOBILE | 1 | Whether to proxy mobile data traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_WIFI | 1 | Whether to proxy WiFi traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_HOTSPOT | 0 | Whether to proxy hotspot traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces; MAC filtering takes effect when enabled) |
PROXY_USB | 0 | Whether to proxy USB tethering traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_TCP / PROXY_UDP | 1 / 1 | Whether to proxy TCP/UDP traffic (1=proxy, 0=do not proxy) |
PROXY_IPV6 | 0 | Whether to proxy IPv6 (1=proxy, 0=disable; in REDIRECT mode, the module will automatically check kernel support for IP6_NF_NAT and IP6_NF_TARGET_REDIRECT. If not supported, IPv6 proxy will be disabled) |
APP_PROXY_ENABLE | 0 | Enable per-app proxy (1=enable) |
APP_PROXY_MODE | blacklist | blacklist (bypass specified apps) or whitelist (proxy only specified apps) |
BYPASS_APPS_LIST / PROXY_APPS_LIST | empty | App list, format: "userID:packageName" (multiple entries separated by spaces, e.g. "0:com.android.systemui 10:com.tencent.mm") |
BYPASS_CN_IP | 0 | Whether to bypass mainland China IPs (1=enable, 0=disable; requires kernel support for ipset. The module will check automatically; if not supported, the feature will be disabled. When enabled, IP lists will be downloaded from the specified URL) |
MAC_FILTER_ENABLE | 0 | Enable MAC address filtering (1=enable, 0=disable; only effective when PROXY_HOTSPOT=1) |
MAC_PROXY_MODE | blacklist | blacklist (bypass specified MACs) or whitelist (proxy only specified MACs) |
BYPASS_MACS_LIST / PROXY_MACS_LIST | empty | MAC address list (multiple entries separated by spaces, e.g. "AA:BB:CC:DD:EE:FF 11:22:33:44:55:66") |
For other configuration options, please refer to AndroidTProxyShell.
After enabling APP_PROXY_ENABLE=1:
BYPASS_APPS_LIST).PROXY_APPS_LIST and set APP_PROXY_MODE=whitelist).Set PROXY_MODE=core or any value other than 0-2. Transparent proxy rules will not be loaded; only the core will be started (suitable for sing-box/clash/mihomo TUN inbound).
After creating an empty file /data/adb/box/manual:
/data/adb/box/scripts/box.service start|stop|restart|status/data/adb/box/scripts/box.tproxy start|stop|restartbox.config and tproxy.conf./data/adb/box/run/ directory./data/adb/service.d/box4_service.sh file but retain the Box data directory /data/adb/box.rm -rf /data/adb/box214 followers · starred Apr 2023
254 followers · starred Jul 2024
14 followers · starred Sep 2025
Shell
51.7%
TypeScript
46.1%
CSS
1.4%
Use sing-box, clash, v2ray, xray tunnel proxy on Android devices.
Shell
1,917
157 commits
updated Sep 30, 2026
This project is a Magisk / KernelSU / APatch module designed to deploy various proxy cores on Android devices, including clash, mihomo, sing-box, v2ray, xray, and hysteria.
Supported transparent proxy modes:
This project essentially combines a proxy core launcher with AndroidTProxyShell to implement transparent proxying.
This project is not responsible for device bricking, data corruption, or any other hardware/software issues.
Important Warning: Please ensure your configuration file does not cause traffic looping, otherwise it may lead to infinite device reboots!
If you are not familiar with proxy configuration, it is recommended to first use user-friendly apps (such as ClashForAndroid, sing-box for Android, v2rayNG, SagerNet, etc.) to learn the basic concepts.
Note: The module does not include any proxy core binary files.
After installation, please manually download the core executable files for your device architecture and place them in the /data/adb/box/bin/ directory.
Core working directory: /data/adb/box/<core_name>
The core is determined by the bin_name variable in /data/adb/box/scripts/box.config. Available options:
sing-box (recommended, default)clashmihomoxrayv2rayhysteriaTip: mihomo and sing-box come with default configuration files that are pre-configured to work with transparent proxy. It is recommended to directly edit the proxy-providers or outbounds sections to add your nodes.
For advanced configuration, please refer to the official documentation:
The module will automatically check the validity of the configuration file, with results saved in /data/adb/box/run/check.log.
The following are the key options in /data/adb/box/scripts/tproxy.conf. Pay special attention to correctly configuring the *_INTERFACE variables (e.g., MOBILE_INTERFACE="rmnet_data+", WIFI_INTERFACE="wlan0", HOTSPOT_INTERFACE="wlan2", USB_INTERFACE="rndis+") to match your device's actual interface names (check with ifconfig or ip link).
| Configuration Item | Default Value | Description |
|---|---|---|
CORE_USER_GROUP | root:net_admin | User and group under which the proxy core runs. Advanced users can customize this (requires setcap support). Must be consistent with the box_user_group variable in box.config |
PROXY_TCP_PORT / PROXY_UDP_PORT | 1536 | Transparent proxy listening port |
PROXY_MODE | 0 | Proxy mode: 0=auto (TPROXY preferred), 1=TPROXY, 2=REDIRECT, any other value (only start the core to support native TUN) |
DNS_HIJACK_ENABLE | 1 | DNS hijacking (0=disable, 1=enable TPROXY, 2=enable REDIRECT; no need to change unless necessary) |
DNS_PORT | 1053 | DNS listening port |
MOBILE_INTERFACE | rmnet_data+ | Mobile data interface name |
WIFI_INTERFACE | wlan0 | WiFi interface name |
HOTSPOT_INTERFACE | wlan2 | Hotspot interface name |
USB_INTERFACE | rndis+ | USB tethering interface name |
PROXY_MOBILE | 1 | Whether to proxy mobile data traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_WIFI | 1 | Whether to proxy WiFi traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_HOTSPOT | 0 | Whether to proxy hotspot traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces; MAC filtering takes effect when enabled) |
PROXY_USB | 0 | Whether to proxy USB tethering traffic (1=proxy, 0=do not proxy; supports any combination with other interfaces) |
PROXY_TCP / PROXY_UDP | 1 / 1 | Whether to proxy TCP/UDP traffic (1=proxy, 0=do not proxy) |
PROXY_IPV6 | 0 | Whether to proxy IPv6 (1=proxy, 0=disable; in REDIRECT mode, the module will automatically check kernel support for IP6_NF_NAT and IP6_NF_TARGET_REDIRECT. If not supported, IPv6 proxy will be disabled) |
APP_PROXY_ENABLE | 0 | Enable per-app proxy (1=enable) |
APP_PROXY_MODE | blacklist | blacklist (bypass specified apps) or whitelist (proxy only specified apps) |
BYPASS_APPS_LIST / PROXY_APPS_LIST | empty | App list, format: "userID:packageName" (multiple entries separated by spaces, e.g. "0:com.android.systemui 10:com.tencent.mm") |
BYPASS_CN_IP | 0 | Whether to bypass mainland China IPs (1=enable, 0=disable; requires kernel support for ipset. The module will check automatically; if not supported, the feature will be disabled. When enabled, IP lists will be downloaded from the specified URL) |
MAC_FILTER_ENABLE | 0 | Enable MAC address filtering (1=enable, 0=disable; only effective when PROXY_HOTSPOT=1) |
MAC_PROXY_MODE | blacklist | blacklist (bypass specified MACs) or whitelist (proxy only specified MACs) |
BYPASS_MACS_LIST / PROXY_MACS_LIST | empty | MAC address list (multiple entries separated by spaces, e.g. "AA:BB:CC:DD:EE:FF 11:22:33:44:55:66") |
For other configuration options, please refer to AndroidTProxyShell.
After enabling APP_PROXY_ENABLE=1:
BYPASS_APPS_LIST).PROXY_APPS_LIST and set APP_PROXY_MODE=whitelist).Set PROXY_MODE=core or any value other than 0-2. Transparent proxy rules will not be loaded; only the core will be started (suitable for sing-box/clash/mihomo TUN inbound).
After creating an empty file /data/adb/box/manual:
/data/adb/box/scripts/box.service start|stop|restart|status/data/adb/box/scripts/box.tproxy start|stop|restartbox.config and tproxy.conf./data/adb/box/run/ directory./data/adb/service.d/box4_service.sh file but retain the Box data directory /data/adb/box.rm -rf /data/adb/box214 followers · starred Apr 2023
254 followers · starred Jul 2024
14 followers · starred Sep 2025
Shell
51.7%
TypeScript
46.1%
CSS
1.4%