Version: 1.4.3
Core: mihomo
phone: meizu20pro
network_mode="mixed"
tun=true
issue= tun mode can't turn on,error show as log below。and the entire device cannot connect to the network.
checked: command "ifconfig" not found "utun" or "tun*",/dev/net/tun dynamic link is correctly established.
run log:
08:49 pm [Info]: Good day
08:49 pm [Info]: xclash [ mihomo ] setup completed
08:49 pm [Info]: Current busybox v1.36.1
08:49 pm [Info]: Using kernel in /data/adb/box/bin/clash.
08:49 pm [Info]: Mihomo Meta alpha-ee6b974 android arm64 with go1.20.11 Tue Dec 5 12:31:26 UTC 2023
Use tags: with_gvisor
08:49 pm [Info]: deleting and backup logs
08:49 pm [Info]: crontab disabled.
08:49 pm [Info]: client-list: [ clash sing-box xray v2fly ]
08:49 pm [Info]: choose: clash, start the service.
08:49 pm [Info]: config /data/adb/box/clash/config.yaml
08:49 pm [Info]: type (tun) already exists in /data/adb/box/clash/config.yaml
08:49 pm [Info]: clash service is running.
08:49 pm [Info]: Proxy-mode: blacklist, Network-mode: mixed
08:49 pm [Info]: clash has started with the 'root:net_admin' user group.
08:49 pm [Info]: clash status: S (sleeping) (PID: 8812)
08:49 pm [Info]: clash memory usage: 70 MB, swap: 0 KB
08:49 pm [Info]: clash CPU usage: 28.1%
08:49 pm [Info]: clash list of allowed CPUs : 0-7
08:49 pm [Info]: clash Which CPU running on : 3
08:49 pm [Info]: battery temperature: 32°C
08:49 pm [Info]: clash running time: 0:04
08:49 pm [Debug]: enhanced-mode: redir-host, fake-ip-range: 198.18.0.1/16, listen-port: 1053, mode: rule
08:49 pm [Info]: Using Mixed: tcp(redirect) + udp(tun).
08:49 pm [Info]: Creating iptables transparent proxy rules.
08:49 pm [Info]: ap+ wlan+ rndis+ swlan+ transparent proxy.
08:49 pm [Info]: Transparent proxy for all apps.
08:49 pm [Info]: Creating iptables transparent proxy rules done.
08:49 pm [Warning]: Disabling IPv6.
08:49 pm [Warning]: tun_device: 'utun' not found
08:49 pm [Info]: clash connected.
#!/system/bin/sh
if [ ! -d /data/adb/modules/busybox-ndk ]; then
export PATH="/data/adb/magisk:/data/adb/ksu/bin:$PATH:/system/bin"
fi
# Take the current time
current_time=$(date +"%I:%M %P")
# define the settings and paths
settings="/data/adb/box/settings.ini"
# set the port numbers for tproxy and redir
tproxy_port="9898"
redir_port="9797"
# enable/disable port detection: true / false
port_detect="false"
# enable/disable IPv6: true / false
ipv6="false"
# list of available kernel binaries
bin_list=( "clash" "sing-box" "xray" "v2fly" )
# for run and download premium or mihomo
# put kernel premium and mihomo into /data/adb/box/bin directory
xclash_option="mihomo"
# select the client to use : clash / sing-box / xray / v2fly
bin_name=clash
# This script is used to set the user and group for the BFM core files.
box_user_group="root:net_admin"
# redirect: tcp only,
# tproxy: for tcp + udp with tproxy,
# mixed: mode with redirect[tcp] + tun[udp]
network_mode="mixed"
# blacklist / whitelist / tun (only tun auto-route)
proxy_mode="blacklist"
# list of package names to be proxied
# android Package Name, For example: ("com.android.captiveportallogin" "com.tencent.mm")
packages_list=()
# The gid in the list will be bypassed or proxied according to the proxy_mode configuration, and the gid can be arbitrarily specified by the busybox setuidgid command
gid_list=()
# Display AP info by typing "ifconfig" in terminal
ap_list=( "ap+" "wlan+" "rndis+" "swlan+" )
# Ignore AP in the out list
ignore_out_list=()
# Set cgroup to limit memory usage
cgroup_memcg="false"
memcg_limit="25M"
# Set cgroup to cpuset usage
cgroup_cpuset="false"
# 0f=0-3 / f0=4-7 / ff=0-7, recommended default: ff
mask_cpuset="ff"
# Set cgroup to blkio usage
cgroup_blkio="false"
# Set box directory variables
box_dir="/data/adb/box"
box_run="${box_dir}/run"
box_log="${box_run}/runs.log"
box_pid="${box_run}/box.pid"
bin_dir="${box_dir}/bin"
bin_path="${bin_dir}/${bin_name}"
# if you don't want to generate the /run/${bin_name}.log file (because it will grow in size over time), replace "${box_run}/${bin_name}.log" to "/dev/null"
bin_log="${box_run}/${bin_name}.log"
# bin_log="/dev/null"
system_packages_file="/data/system/packages.list"
uid_list=("/data/adb/box/run/appuid.list")
# Update subscription & geox
# Set update interval using cron, for more information: https://crontab.guru/
# set 'true' to enable Cron job
interva_update="0 0,6,12,18,22 * * *" # will update every hour 00,06,12,18
run_crontab="false"
# type "su -c /data/adb/box/scripts/box.tool geox" to update geox
update_geo="false"
# if "renew=true" it will update config.yaml not subscription configuration
# type "su -c /data/adb/box/scripts/box.tool subs" to update subscription
renew=false
update_subscription="false"
# ex: clash subscription url
subscription_url_clash="" # this is just an example.
# clash configuration
name_clash_config="config.yaml"
clash_config="${box_dir}/clash/${name_clash_config}"
# clash subscription
name_provide_clash_config="subscription.yaml"
clash_provide_config="${box_dir}/clash/provide/${name_provide_clash_config}"
# support rules specified in subscriptions, This is useful when the subscription contains customized rules as well.
custom_rules_subs="false"
name_provide_clash_rules="rules.yaml"
clash_provide_rules="${box_dir}/clash/provide/${name_provide_clash_rules}"
# sing configuration
name_sing_config="config.json"
sing_config="${box_dir}/sing-box/${name_sing_config}"
normal="\033[0m"
orange="\033[1;38;5;208m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
blue="\033[1;34m"
log() {
# Selects the text color according to the parameters
case $1 in
Info) color="${blue}" ;;
Error) color="${red}" ;;
Warning) color="${yellow}" ;;
*) color="${green}" ;;
esac
# Add messages to time and parameters
message="${current_time} [$1]: $2"
if [ -t 1 ]; then
# Prints messages to the console
echo -e "${color}${message}${normal}"
else
# Print messages to a log file
echo "${message}" >> ${box_log} 2>&1
fi
}
Version: 1.4.3 Core: mihomo phone: meizu20pro network_mode="mixed" tun=true issue= tun mode can't turn on,error show as log below。and the entire device cannot connect to the network. checked: command "ifconfig" not found "utun" or "tun*",/dev/net/tun dynamic link is correctly established.
run log:
Clash.log:
config.yaml:
setting.ini: